@staff0rd/assist 0.908.3 → 0.909.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.908.3",
9
+ version: "0.909.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -1287,7 +1287,8 @@ var assistConfigShape = {
1287
1287
  extracts: z5.record(z5.string(), miroExtractSchema).optional()
1288
1288
  }).optional(),
1289
1289
  news: z5.strictObject({
1290
- showInNav: z5.boolean().default(false)
1290
+ showInNav: z5.boolean().default(false),
1291
+ feeds: z5.array(z5.string()).optional()
1291
1292
  }).optional(),
1292
1293
  next: z5.strictObject({
1293
1294
  peers: z5.array(z5.string()).optional(),
@@ -4770,12 +4771,12 @@ async function untrackedFileDiff(cwd, path108) {
4770
4771
  });
4771
4772
  }
4772
4773
  async function untrackedDiff(cwd) {
4773
- const list5 = await execGit(cwd, [
4774
+ const list6 = await execGit(cwd, [
4774
4775
  "ls-files",
4775
4776
  "--others",
4776
4777
  "--exclude-standard"
4777
4778
  ]);
4778
- const paths = list5.split("\n").filter(Boolean);
4779
+ const paths = list6.split("\n").filter(Boolean);
4779
4780
  const diffs = await Promise.all(
4780
4781
  paths.map((path108) => untrackedFileDiff(cwd, path108))
4781
4782
  );
@@ -5968,6 +5969,11 @@ var newsConfigHelp = [
5968
5969
  key: "news.showInNav",
5969
5970
  setter: "assist config set news.showInNav true",
5970
5971
  note: "show the News tab in the web UI top nav (default false); /news stays reachable by URL either way"
5972
+ },
5973
+ {
5974
+ key: "news.feeds",
5975
+ setter: "assist config set news.feeds <url1>,<url2>",
5976
+ note: "RSS feed URLs shown on the News page; stored in the database so every machine shares them (assist news add/list/remove edit the same list)"
5971
5977
  }
5972
5978
  ];
5973
5979
 
@@ -6985,12 +6991,12 @@ function parseDiffNameStatus(output) {
6985
6991
 
6986
6992
  // src/commands/sessions/web/groupedCounts.ts
6987
6993
  async function untrackedPaths(cwd) {
6988
- const list5 = await execGit(cwd, [
6994
+ const list6 = await execGit(cwd, [
6989
6995
  "ls-files",
6990
6996
  "--others",
6991
6997
  "--exclude-standard"
6992
6998
  ]);
6993
- return list5.split("\n").filter(Boolean);
6999
+ return list6.split("\n").filter(Boolean);
6994
7000
  }
6995
7001
  async function groupedCounts(cwd, groups) {
6996
7002
  const outputs = await Promise.all(
@@ -19890,9 +19896,9 @@ function parsePerms(entries) {
19890
19896
  const tool = m[1];
19891
19897
  const command = normCmd(m[2]);
19892
19898
  const wildcard = m[3] !== void 0;
19893
- const list5 = map.get(tool) ?? [];
19894
- list5.push({ command, wildcard });
19895
- map.set(tool, list5);
19899
+ const list6 = map.get(tool) ?? [];
19900
+ list6.push({ command, wildcard });
19901
+ map.set(tool, list6);
19896
19902
  }
19897
19903
  }
19898
19904
  return map;
@@ -22058,9 +22064,63 @@ function registerComplexity(program) {
22058
22064
  // src/commands/configList.ts
22059
22065
  import chalk126 from "chalk";
22060
22066
  import { stringify as stringifyYaml2 } from "yaml";
22061
- function configList() {
22067
+
22068
+ // src/commands/backlog/replaceFeeds.ts
22069
+ async function replaceFeeds(db, urls) {
22070
+ const unique = [...new Set(urls)];
22071
+ await db.transaction(async (tx) => {
22072
+ await tx.delete(feeds);
22073
+ if (unique.length > 0)
22074
+ await tx.insert(feeds).values(unique.map((url) => ({ url })));
22075
+ });
22076
+ }
22077
+
22078
+ // src/commands/config/dbBackedConfigKeys.ts
22079
+ var newsFeeds = {
22080
+ read: async (db) => {
22081
+ const urls = await listFeeds(db);
22082
+ return urls.length > 0 ? urls : void 0;
22083
+ },
22084
+ write: (db, value) => replaceFeeds(db, value),
22085
+ unset: async (db) => {
22086
+ const had = (await listFeeds(db)).length > 0;
22087
+ await replaceFeeds(db, []);
22088
+ return had;
22089
+ }
22090
+ };
22091
+ var dbBackedConfigKeys = {
22092
+ "news.feeds": newsFeeds
22093
+ };
22094
+ function isDbBackedConfigKey(key) {
22095
+ return Object.hasOwn(dbBackedConfigKeys, key);
22096
+ }
22097
+ function dbBackedRepoError(key) {
22098
+ return `"${key}" is stored in the database and shared by every repo; drop --repo`;
22099
+ }
22100
+
22101
+ // src/commands/config/withDbBackedConfigValues.ts
22102
+ function covers(scope, key) {
22103
+ return scope === void 0 || scope === key || key.startsWith(`${scope}.`) || scope.startsWith(`${key}.`);
22104
+ }
22105
+ function dbBackedKeysIn(scope) {
22106
+ if (!process.env.ASSIST_DATABASE_URL && !loadConfig().database.url) return [];
22107
+ return Object.keys(dbBackedConfigKeys).filter((key) => covers(scope, key));
22108
+ }
22109
+ async function withDbBackedConfigValues(config, keys) {
22110
+ if (keys.length === 0) return config;
22111
+ const db = await getDb();
22112
+ let merged = config;
22113
+ for (const key of keys) {
22114
+ const value = await dbBackedConfigKeys[key].read(db);
22115
+ if (value !== void 0) merged = setNestedValue(merged, key, value);
22116
+ }
22117
+ return merged;
22118
+ }
22119
+
22120
+ // src/commands/configList.ts
22121
+ async function configList() {
22062
22122
  const config = maskConfigSecrets(
22063
- loadConfig(),
22123
+ await withDbBackedConfigValues(loadConfig(), dbBackedKeysIn()),
22064
22124
  describeConfigNode(assistConfigSchema)
22065
22125
  );
22066
22126
  console.log(
@@ -22088,10 +22148,15 @@ function maskConfigKeySecrets(key, value) {
22088
22148
 
22089
22149
  // src/commands/config/configGet.ts
22090
22150
  function configGet(key, options2 = {}) {
22091
- const value = requireNestedValue(
22092
- loadConfig(),
22093
- key
22151
+ const config = loadConfig();
22152
+ const dbKeys = dbBackedKeysIn(key);
22153
+ if (dbKeys.length === 0) return printValue(config, key, options2);
22154
+ return withDbBackedConfigValues(config, dbKeys).then(
22155
+ (merged) => printValue(merged, key, options2)
22094
22156
  );
22157
+ }
22158
+ function printValue(config, key, options2) {
22159
+ const value = requireNestedValue(config, key);
22095
22160
  console.log(
22096
22161
  formatOutput(options2.reveal ? value : maskConfigKeySecrets(key, value))
22097
22162
  );
@@ -22286,7 +22351,7 @@ function typeText(leaf) {
22286
22351
  }
22287
22352
 
22288
22353
  // src/commands/config/configSet.ts
22289
- import chalk132 from "chalk";
22354
+ import chalk134 from "chalk";
22290
22355
 
22291
22356
  // src/commands/config/coerceCliConfigValue.ts
22292
22357
  function coerceCliConfigValue(key, raw) {
@@ -22317,39 +22382,57 @@ function resolveRepoTarget(key, value, repo) {
22317
22382
  return { key, value, useRepo: repo === true, repoName: void 0 };
22318
22383
  }
22319
22384
 
22385
+ // src/commands/config/setDbBackedConfigKey.ts
22386
+ import chalk132 from "chalk";
22387
+ async function setDbBackedConfigKey(key, value, useRepo) {
22388
+ if (useRepo) exitWithConfigErrors([dbBackedRepoError(key)]);
22389
+ await dbBackedConfigKeys[key].write(await getDb(), value);
22390
+ console.log(chalk132.green(`Set ${key} = ${JSON.stringify(value)} (database)`));
22391
+ }
22392
+
22393
+ // src/commands/config/setFileConfigKey.ts
22394
+ import chalk133 from "chalk";
22395
+ async function setFileConfigKey({ key, useRepo, repoName, global }, coerced) {
22396
+ const target = useRepo ? `repo: ${await applyRepoOrExit(key, coerced, repoName)}` : applyOrExit(key, coerced, global);
22397
+ const shown = JSON.stringify(maskConfigKeySecrets(key, coerced));
22398
+ console.log(chalk133.green(`Set ${key} = ${shown} (${target})`));
22399
+ }
22400
+ function applyOrExit(key, coerced, global) {
22401
+ const result = applyConfigSet(key, coerced, global);
22402
+ if (!result.ok) exitWithConfigErrors(result.errors);
22403
+ return result.target;
22404
+ }
22405
+ async function applyRepoOrExit(key, coerced, repoName) {
22406
+ const result = await applySharedRepoConfigSet(key, coerced, repoName);
22407
+ if (!result.ok) exitWithConfigErrors(result.errors);
22408
+ return result.label;
22409
+ }
22410
+
22320
22411
  // src/commands/config/configSet.ts
22321
22412
  async function configSet(key, value, options2 = {}) {
22322
22413
  if (options2.repo !== void 0 && !options2.global) {
22323
22414
  console.error(
22324
- chalk132.red("--repo writes to the global config; add -g (e.g. -g --repo)")
22415
+ chalk134.red("--repo writes to the global config; add -g (e.g. -g --repo)")
22325
22416
  );
22326
22417
  process.exit(1);
22327
22418
  }
22328
22419
  const resolved = resolveRepoTarget(key, value, options2.repo);
22329
22420
  if (resolved.value === void 0) {
22330
- console.error(chalk132.red(`Missing required argument for '${resolved.key}'`));
22421
+ console.error(chalk134.red(`Missing required argument for '${resolved.key}'`));
22331
22422
  process.exit(1);
22332
22423
  }
22333
22424
  const coercion = coerceCliConfigValue(resolved.key, resolved.value);
22334
22425
  if (!coercion.ok) exitWithConfigErrors([coercion.error]);
22335
- const coerced = coercion.value;
22336
- const target = resolved.useRepo ? `repo: ${await applyRepoOrExit(resolved.key, coerced, resolved.repoName)}` : applyOrExit(resolved.key, coerced, options2.global ?? false);
22337
- const shown = JSON.stringify(maskConfigKeySecrets(resolved.key, coerced));
22338
- console.log(chalk132.green(`Set ${resolved.key} = ${shown} (${target})`));
22339
- }
22340
- function applyOrExit(key, coerced, global) {
22341
- const result = applyConfigSet(key, coerced, global);
22342
- if (!result.ok) exitWithConfigErrors(result.errors);
22343
- return result.target;
22344
- }
22345
- async function applyRepoOrExit(key, coerced, repoName) {
22346
- const result = await applySharedRepoConfigSet(key, coerced, repoName);
22347
- if (!result.ok) exitWithConfigErrors(result.errors);
22348
- return result.label;
22426
+ if (isDbBackedConfigKey(resolved.key))
22427
+ return setDbBackedConfigKey(resolved.key, coercion.value, resolved.useRepo);
22428
+ await setFileConfigKey(
22429
+ { ...resolved, global: options2.global ?? false },
22430
+ coercion.value
22431
+ );
22349
22432
  }
22350
22433
 
22351
22434
  // src/commands/config/configUnset.ts
22352
- import chalk133 from "chalk";
22435
+ import chalk137 from "chalk";
22353
22436
 
22354
22437
  // src/commands/config/resolveRepoUnsetTarget.ts
22355
22438
  function resolveRepoUnsetTarget(key, repo) {
@@ -22361,11 +22444,44 @@ function resolveRepoUnsetTarget(key, repo) {
22361
22444
  return { key, useRepo: repo === true, repoName: void 0 };
22362
22445
  }
22363
22446
 
22447
+ // src/commands/config/unsetDbBackedConfigKey.ts
22448
+ import chalk135 from "chalk";
22449
+ async function unsetDbBackedConfigKey(key, useRepo) {
22450
+ if (useRepo) exitWithConfigErrors([dbBackedRepoError(key)]);
22451
+ const removed = await dbBackedConfigKeys[key].unset(await getDb());
22452
+ console.log(
22453
+ removed ? chalk135.green(`Unset ${key} (database)`) : chalk135.yellow(`${key} is not set in the database`)
22454
+ );
22455
+ }
22456
+
22457
+ // src/commands/config/unsetFileConfigKey.ts
22458
+ import chalk136 from "chalk";
22459
+ async function unsetFileConfigKey({
22460
+ key,
22461
+ useRepo,
22462
+ repoName,
22463
+ global
22464
+ }) {
22465
+ const result = useRepo ? await applySharedRepoConfigUnset(key, repoName) : applyConfigUnset(key, global);
22466
+ if (!result.ok) exitWithConfigErrors(result.errors);
22467
+ if (!result.removed) {
22468
+ console.log(chalk136.yellow(`${key} is not set in ${whereLabel(result)}`));
22469
+ return;
22470
+ }
22471
+ console.log(chalk136.green(`Unset ${key} (${targetLabel(result)})`));
22472
+ }
22473
+ function whereLabel(result) {
22474
+ return result.target === "repo" ? `repos.${result.label}` : `the ${result.target} config`;
22475
+ }
22476
+ function targetLabel(result) {
22477
+ return result.target === "repo" ? `repo: ${result.label}` : result.target;
22478
+ }
22479
+
22364
22480
  // src/commands/config/configUnset.ts
22365
22481
  async function configUnset(key, options2 = {}) {
22366
22482
  if (options2.repo !== void 0 && !options2.global) {
22367
22483
  console.error(
22368
- chalk133.red(
22484
+ chalk137.red(
22369
22485
  "--repo removes from the global config; add -g (e.g. -g --repo)"
22370
22486
  )
22371
22487
  );
@@ -22373,25 +22489,18 @@ async function configUnset(key, options2 = {}) {
22373
22489
  }
22374
22490
  const resolved = resolveRepoUnsetTarget(key, options2.repo);
22375
22491
  if (resolved.key === void 0) {
22376
- console.error(chalk133.red("Missing required argument 'key'"));
22492
+ console.error(chalk137.red("Missing required argument 'key'"));
22377
22493
  process.exit(1);
22378
22494
  return;
22379
22495
  }
22380
- const result = resolved.useRepo ? await applySharedRepoConfigUnset(resolved.key, resolved.repoName) : applyConfigUnset(resolved.key, options2.global ?? false);
22381
- if (!result.ok) exitWithConfigErrors(result.errors);
22382
- if (!result.removed) {
22383
- console.log(
22384
- chalk133.yellow(`${resolved.key} is not set in ${whereLabel(result)}`)
22385
- );
22386
- return;
22387
- }
22388
- console.log(chalk133.green(`Unset ${resolved.key} (${targetLabel(result)})`));
22389
- }
22390
- function whereLabel(result) {
22391
- return result.target === "repo" ? `repos.${result.label}` : `the ${result.target} config`;
22392
- }
22393
- function targetLabel(result) {
22394
- return result.target === "repo" ? `repo: ${result.label}` : result.target;
22496
+ if (isDbBackedConfigKey(resolved.key))
22497
+ return unsetDbBackedConfigKey(resolved.key, resolved.useRepo);
22498
+ await unsetFileConfigKey({
22499
+ key: resolved.key,
22500
+ useRepo: resolved.useRepo,
22501
+ repoName: resolved.repoName,
22502
+ global: options2.global ?? false
22503
+ });
22395
22504
  }
22396
22505
 
22397
22506
  // src/commands/registerConfig.ts
@@ -22423,7 +22532,7 @@ function registerConfig(program) {
22423
22532
 
22424
22533
  // src/commands/extension/extension.ts
22425
22534
  import { cp } from "fs/promises";
22426
- import chalk134 from "chalk";
22535
+ import chalk138 from "chalk";
22427
22536
 
22428
22537
  // src/commands/extension/extensionDir.ts
22429
22538
  import { existsSync as existsSync48 } from "fs";
@@ -22446,21 +22555,21 @@ async function loadPath(source) {
22446
22555
  return WSL_WINDOWS_PATH;
22447
22556
  } catch {
22448
22557
  console.log(
22449
- chalk134.yellow(`could not copy extension to ${WSL_WINDOWS_PATH}`)
22558
+ chalk138.yellow(`could not copy extension to ${WSL_WINDOWS_PATH}`)
22450
22559
  );
22451
22560
  return source;
22452
22561
  }
22453
22562
  }
22454
22563
  async function extension() {
22455
22564
  const path108 = await loadPath(extensionDir());
22456
- console.log(chalk134.bold("assist \u2014 GitHub browser extension"));
22457
- console.log(chalk134.dim(`load the unpacked extension from ${path108}`));
22565
+ console.log(chalk138.bold("assist \u2014 GitHub browser extension"));
22566
+ console.log(chalk138.dim(`load the unpacked extension from ${path108}`));
22458
22567
  }
22459
22568
 
22460
22569
  // src/commands/extension/printExtensionUrl.ts
22461
22570
  import { readFile as readFile4 } from "fs/promises";
22462
22571
  import { join as join54 } from "path";
22463
- import chalk135 from "chalk";
22572
+ import chalk139 from "chalk";
22464
22573
 
22465
22574
  // src/commands/extension/latestUpdate.ts
22466
22575
  function latestUpdate(manifest, updates2) {
@@ -22483,7 +22592,7 @@ async function printExtensionUrl() {
22483
22592
  const response = await fetch(update_url);
22484
22593
  const link3 = response.ok ? latestUpdateLink(manifest, await response.text()) : void 0;
22485
22594
  if (!link3) {
22486
- console.log(chalk135.red(`no signed build found in ${update_url}`));
22595
+ console.log(chalk139.red(`no signed build found in ${update_url}`));
22487
22596
  process.exitCode = 1;
22488
22597
  return;
22489
22598
  }
@@ -22494,7 +22603,7 @@ async function printExtensionUrl() {
22494
22603
  import { rm as rm2 } from "fs/promises";
22495
22604
  import { homedir as homedir21, tmpdir as tmpdir3 } from "os";
22496
22605
  import { join as join60 } from "path";
22497
- import chalk137 from "chalk";
22606
+ import chalk141 from "chalk";
22498
22607
 
22499
22608
  // src/commands/extension/copySignedXpi.ts
22500
22609
  import { copyFile } from "fs/promises";
@@ -22519,7 +22628,7 @@ async function findSignedXpi(dir) {
22519
22628
 
22520
22629
  // src/commands/extension/signedAddonInstallPath.ts
22521
22630
  import { cp as cp2 } from "fs/promises";
22522
- import chalk136 from "chalk";
22631
+ import chalk140 from "chalk";
22523
22632
  var WSL_WINDOWS_XPI = "/mnt/c/tools/assist-extension.xpi";
22524
22633
  var WSL_WINDOWS_PATH2 = String.raw`C:\tools\assist-extension.xpi`;
22525
22634
  async function signedAddonInstallPath(xpi) {
@@ -22529,7 +22638,7 @@ async function signedAddonInstallPath(xpi) {
22529
22638
  return WSL_WINDOWS_PATH2;
22530
22639
  } catch {
22531
22640
  console.log(
22532
- chalk136.yellow(`could not copy the add-on to ${WSL_WINDOWS_PATH2}`)
22641
+ chalk140.yellow(`could not copy the add-on to ${WSL_WINDOWS_PATH2}`)
22533
22642
  );
22534
22643
  return xpi;
22535
22644
  }
@@ -22622,15 +22731,15 @@ async function signExtension() {
22622
22731
  const source = extensionDir();
22623
22732
  const problem = signPreflightProblem(source);
22624
22733
  if (problem) {
22625
- console.log(chalk137.red(problem.message));
22626
- console.log(chalk137.dim(problem.hint));
22734
+ console.log(chalk141.red(problem.message));
22735
+ console.log(chalk141.dim(problem.hint));
22627
22736
  process.exitCode = 1;
22628
22737
  return;
22629
22738
  }
22630
22739
  const { version: version2 } = package_default;
22631
22740
  await stageExtension(source, STAGING_DIR, version2);
22632
22741
  await rm2(ARTIFACTS_DIR, { recursive: true, force: true });
22633
- console.log(chalk137.bold(`signing version ${version2} for self-distribution`));
22742
+ console.log(chalk141.bold(`signing version ${version2} for self-distribution`));
22634
22743
  const { done: done2 } = spawnInherit("npx", [
22635
22744
  "--yes",
22636
22745
  "web-ext",
@@ -22640,13 +22749,13 @@ async function signExtension() {
22640
22749
  "--channel=unlisted"
22641
22750
  ]);
22642
22751
  if (await done2 !== 0) {
22643
- console.log(chalk137.red("web-ext sign failed"));
22752
+ console.log(chalk141.red("web-ext sign failed"));
22644
22753
  process.exitCode = 1;
22645
22754
  return;
22646
22755
  }
22647
22756
  const xpi = await findSignedXpi(ARTIFACTS_DIR);
22648
22757
  if (!xpi) {
22649
- console.log(chalk137.red(`web-ext wrote no .xpi into ${ARTIFACTS_DIR}`));
22758
+ console.log(chalk141.red(`web-ext wrote no .xpi into ${ARTIFACTS_DIR}`));
22650
22759
  process.exitCode = 1;
22651
22760
  return;
22652
22761
  }
@@ -22654,7 +22763,7 @@ async function signExtension() {
22654
22763
  const path108 = await signedAddonInstallPath(
22655
22764
  await copySignedXpi(xpi, ARTIFACTS_DIR)
22656
22765
  );
22657
- console.log(chalk137.dim(`install the signed add-on from ${path108}`));
22766
+ console.log(chalk141.dim(`install the signed add-on from ${path108}`));
22658
22767
  }
22659
22768
 
22660
22769
  // src/commands/registerExtension.ts
@@ -22715,11 +22824,11 @@ async function dropRetiredTables(exec3) {
22715
22824
  }
22716
22825
 
22717
22826
  // src/commands/db/reportRetiredTables.ts
22718
- import chalk138 from "chalk";
22827
+ import chalk142 from "chalk";
22719
22828
  function reportRetiredTables(tables) {
22720
22829
  for (const table of tables) {
22721
22830
  console.error(
22722
- chalk138.yellow(
22831
+ chalk142.yellow(
22723
22832
  `Retired table ${table.name} still exists (${table.rows} rows). Run \`assist db drop-retired\` to drop it.`
22724
22833
  )
22725
22834
  );
@@ -22727,40 +22836,40 @@ function reportRetiredTables(tables) {
22727
22836
  }
22728
22837
 
22729
22838
  // src/commands/db/reportMigrationStatus.ts
22730
- import chalk139 from "chalk";
22839
+ import chalk143 from "chalk";
22731
22840
  function reportApplied(applied) {
22732
22841
  if (applied.length === 0) {
22733
- console.error(chalk139.green("Database is up to date; nothing to apply."));
22842
+ console.error(chalk143.green("Database is up to date; nothing to apply."));
22734
22843
  return;
22735
22844
  }
22736
22845
  for (const migration of applied) {
22737
22846
  console.error(
22738
- chalk139.green(`Applied migration ${migration.id} (${migration.name}).`)
22847
+ chalk143.green(`Applied migration ${migration.id} (${migration.name}).`)
22739
22848
  );
22740
22849
  }
22741
22850
  }
22742
22851
  function reportMigrationStatus(status2) {
22743
22852
  if (status2.state === "in-sync") {
22744
22853
  console.error(
22745
- chalk139.green(`In sync at migration ${status2.version} (latest).`)
22854
+ chalk143.green(`In sync at migration ${status2.version} (latest).`)
22746
22855
  );
22747
22856
  return;
22748
22857
  }
22749
22858
  if (status2.state === "behind") {
22750
22859
  console.error(
22751
- chalk139.yellow(
22860
+ chalk143.yellow(
22752
22861
  `Behind: applied ${status2.applied}, build expects ${status2.expected}.`
22753
22862
  )
22754
22863
  );
22755
22864
  console.error(
22756
- chalk139.yellow(
22865
+ chalk143.yellow(
22757
22866
  `Pending: ${status2.pending.join(", ")}. Run \`assist db migrate\`.`
22758
22867
  )
22759
22868
  );
22760
22869
  return;
22761
22870
  }
22762
22871
  console.error(
22763
- chalk139.red(
22872
+ chalk143.red(
22764
22873
  `Ahead: applied ${status2.applied}, build knows ${status2.expected}. Update assist.`
22765
22874
  )
22766
22875
  );
@@ -22802,7 +22911,7 @@ function registerDb(program) {
22802
22911
 
22803
22912
  // src/commands/dbMigration/dbMigrationConfirm.ts
22804
22913
  import { unlinkSync as unlinkSync9, writeFileSync as writeFileSync27 } from "fs";
22805
- import chalk140 from "chalk";
22914
+ import chalk144 from "chalk";
22806
22915
 
22807
22916
  // src/commands/dbMigration/getMigrationPinPath.ts
22808
22917
  import { join as join61 } from "path";
@@ -22833,7 +22942,7 @@ function dbMigrationConfirm(pin2) {
22833
22942
  sweepRestrictedDir();
22834
22943
  const state = readMigrationPinState(pin2);
22835
22944
  if (!state) {
22836
- console.error(chalk140.red(`No pending migration unlock for pin: ${pin2}`));
22945
+ console.error(chalk144.red(`No pending migration unlock for pin: ${pin2}`));
22837
22946
  process.exitCode = 1;
22838
22947
  return;
22839
22948
  }
@@ -22843,7 +22952,7 @@ function dbMigrationConfirm(pin2) {
22843
22952
  );
22844
22953
  unlinkSync9(getMigrationPinPath(pin2));
22845
22954
  console.log(
22846
- chalk140.green(
22955
+ chalk144.green(
22847
22956
  `Approved creation of migration ${state.migrationId}. The next write of that migration module will be allowed once.`
22848
22957
  )
22849
22958
  );
@@ -22852,7 +22961,7 @@ function dbMigrationConfirm(pin2) {
22852
22961
  // src/commands/dbMigration/dbMigrationUnlock.ts
22853
22962
  import { mkdirSync as mkdirSync17, writeFileSync as writeFileSync28 } from "fs";
22854
22963
  import { randomInt as randomInt2 } from "crypto";
22855
- import chalk141 from "chalk";
22964
+ import chalk145 from "chalk";
22856
22965
 
22857
22966
  // src/commands/dbMigration/nextMigrationId.ts
22858
22967
  function nextMigrationId() {
@@ -22867,7 +22976,7 @@ function dbMigrationUnlock() {
22867
22976
  sweepRestrictedDir();
22868
22977
  writeFileSync28(getMigrationPinPath(pin2), JSON.stringify({ pin: pin2, migrationId }));
22869
22978
  console.error(
22870
- chalk141.yellow.bold(
22979
+ chalk145.yellow.bold(
22871
22980
  "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."
22872
22981
  )
22873
22982
  );
@@ -22877,7 +22986,7 @@ function dbMigrationUnlock() {
22877
22986
  });
22878
22987
  if (!delivered) {
22879
22988
  console.error(
22880
- chalk141.red(
22989
+ chalk145.red(
22881
22990
  "Could not deliver the confirmation pin via notification.\nThe migration cannot be approved until the notification channel works."
22882
22991
  )
22883
22992
  );
@@ -22887,7 +22996,7 @@ function dbMigrationUnlock() {
22887
22996
  console.log(
22888
22997
  `A confirmation pin was sent to your desktop notifications.
22889
22998
  To approve creating migration ${migrationId}, run:
22890
- ${chalk141.cyan(" assist db-migration confirm <PIN>")}
22999
+ ${chalk145.cyan(" assist db-migration confirm <PIN>")}
22891
23000
  using the pin from that notification.`
22892
23001
  );
22893
23002
  }
@@ -22907,7 +23016,7 @@ function registerDbMigration(parent) {
22907
23016
 
22908
23017
  // src/commands/deploy/redirect.ts
22909
23018
  import { existsSync as existsSync52, readFileSync as readFileSync34, writeFileSync as writeFileSync29 } from "fs";
22910
- import chalk142 from "chalk";
23019
+ import chalk146 from "chalk";
22911
23020
  var TRAILING_SLASH_SCRIPT = ` <script>
22912
23021
  if (!window.location.pathname.endsWith('/')) {
22913
23022
  window.location.href = \`\${window.location.pathname}/\${window.location.search}\${window.location.hash}\`;
@@ -22916,23 +23025,23 @@ var TRAILING_SLASH_SCRIPT = ` <script>
22916
23025
  function redirect() {
22917
23026
  const indexPath = "index.html";
22918
23027
  if (!existsSync52(indexPath)) {
22919
- console.log(chalk142.yellow("No index.html found"));
23028
+ console.log(chalk146.yellow("No index.html found"));
22920
23029
  return;
22921
23030
  }
22922
23031
  const content = readFileSync34(indexPath, "utf8");
22923
23032
  if (content.includes("window.location.pathname.endsWith('/')")) {
22924
- console.log(chalk142.dim("Trailing slash script already present"));
23033
+ console.log(chalk146.dim("Trailing slash script already present"));
22925
23034
  return;
22926
23035
  }
22927
23036
  const headCloseIndex = content.indexOf("</head>");
22928
23037
  if (headCloseIndex === -1) {
22929
- console.log(chalk142.red("Could not find </head> tag in index.html"));
23038
+ console.log(chalk146.red("Could not find </head> tag in index.html"));
22930
23039
  return;
22931
23040
  }
22932
23041
  const newContent = `${content.slice(0, headCloseIndex) + TRAILING_SLASH_SCRIPT}
22933
23042
  ${content.slice(headCloseIndex)}`;
22934
23043
  writeFileSync29(indexPath, newContent);
22935
- console.log(chalk142.green("Added trailing slash redirect to index.html"));
23044
+ console.log(chalk146.green("Added trailing slash redirect to index.html"));
22936
23045
  }
22937
23046
 
22938
23047
  // src/commands/registerDeploy.ts
@@ -22959,7 +23068,7 @@ function loadBlogSkipDays(repoName) {
22959
23068
 
22960
23069
  // src/commands/devlog/shared.ts
22961
23070
  import { execSync as execSync31 } from "child_process";
22962
- import chalk143 from "chalk";
23071
+ import chalk147 from "chalk";
22963
23072
 
22964
23073
  // src/shared/getRepoName.ts
22965
23074
  import { existsSync as existsSync53, readFileSync as readFileSync35 } from "fs";
@@ -23068,13 +23177,13 @@ function shouldIgnoreCommit(files, ignorePaths) {
23068
23177
  }
23069
23178
  function printCommitsWithFiles(commits2, ignore3, verbose) {
23070
23179
  for (const commit2 of commits2) {
23071
- console.log(` ${chalk143.yellow(commit2.hash)} ${commit2.message}`);
23180
+ console.log(` ${chalk147.yellow(commit2.hash)} ${commit2.message}`);
23072
23181
  if (verbose) {
23073
23182
  const visibleFiles = commit2.files.filter(
23074
23183
  (file) => !ignore3.some((p) => file.startsWith(p))
23075
23184
  );
23076
23185
  for (const file of visibleFiles) {
23077
- console.log(` ${chalk143.dim(file)}`);
23186
+ console.log(` ${chalk147.dim(file)}`);
23078
23187
  }
23079
23188
  }
23080
23189
  }
@@ -23099,15 +23208,15 @@ function parseGitLogCommits(output, ignore3, afterDate) {
23099
23208
  }
23100
23209
 
23101
23210
  // src/commands/devlog/list/printDateHeader.ts
23102
- import chalk144 from "chalk";
23211
+ import chalk148 from "chalk";
23103
23212
  function printDateHeader(date, isSkipped, entries) {
23104
23213
  if (isSkipped) {
23105
- console.log(`${chalk144.bold.blue(date)} ${chalk144.dim("skipped")}`);
23214
+ console.log(`${chalk148.bold.blue(date)} ${chalk148.dim("skipped")}`);
23106
23215
  } else if (entries && entries.length > 0) {
23107
- const entryInfo = entries.map((e) => `${chalk144.green(e.version)} ${e.title}`).join(" | ");
23108
- console.log(`${chalk144.bold.blue(date)} ${entryInfo}`);
23216
+ const entryInfo = entries.map((e) => `${chalk148.green(e.version)} ${e.title}`).join(" | ");
23217
+ console.log(`${chalk148.bold.blue(date)} ${entryInfo}`);
23109
23218
  } else {
23110
- console.log(`${chalk144.bold.blue(date)} ${chalk144.red("\u26A0 devlog missing")}`);
23219
+ console.log(`${chalk148.bold.blue(date)} ${chalk148.red("\u26A0 devlog missing")}`);
23111
23220
  }
23112
23221
  }
23113
23222
 
@@ -23211,24 +23320,24 @@ function bumpVersion(version2, type) {
23211
23320
 
23212
23321
  // src/commands/devlog/next/displayNextEntry.ts
23213
23322
  import { execFileSync as execFileSync9 } from "child_process";
23214
- import chalk146 from "chalk";
23323
+ import chalk150 from "chalk";
23215
23324
 
23216
23325
  // src/commands/devlog/next/displayNextEntry/displayVersion.ts
23217
- import chalk145 from "chalk";
23326
+ import chalk149 from "chalk";
23218
23327
  function displayVersion(conventional, firstHash, patchVersion, minorVersion) {
23219
23328
  if (conventional && firstHash) {
23220
23329
  const version2 = getVersionAtCommit(firstHash);
23221
23330
  if (version2) {
23222
- console.log(`${chalk145.bold("version:")} ${stripToMinor(version2)}`);
23331
+ console.log(`${chalk149.bold("version:")} ${stripToMinor(version2)}`);
23223
23332
  } else {
23224
- console.log(`${chalk145.bold("version:")} ${chalk145.red("unknown")}`);
23333
+ console.log(`${chalk149.bold("version:")} ${chalk149.red("unknown")}`);
23225
23334
  }
23226
23335
  } else if (patchVersion && minorVersion) {
23227
23336
  console.log(
23228
- `${chalk145.bold("version:")} ${patchVersion} (patch) or ${minorVersion} (minor)`
23337
+ `${chalk149.bold("version:")} ${patchVersion} (patch) or ${minorVersion} (minor)`
23229
23338
  );
23230
23339
  } else {
23231
- console.log(`${chalk145.bold("version:")} v0.1 (initial)`);
23340
+ console.log(`${chalk149.bold("version:")} v0.1 (initial)`);
23232
23341
  }
23233
23342
  }
23234
23343
 
@@ -23276,16 +23385,16 @@ function noCommitsMessage(hasLastInfo) {
23276
23385
  return hasLastInfo ? "No commits after last versioned entry" : "No commits found";
23277
23386
  }
23278
23387
  function logName(repoName) {
23279
- console.log(`${chalk146.bold("name:")} ${repoName}`);
23388
+ console.log(`${chalk150.bold("name:")} ${repoName}`);
23280
23389
  }
23281
23390
  function displayNextEntry(ctx, targetDate, commits2) {
23282
23391
  logName(ctx.repoName);
23283
23392
  printVersionInfo(ctx.config, ctx.lastInfo, commits2[0]?.hash);
23284
- console.log(chalk146.bold.blue(targetDate));
23393
+ console.log(chalk150.bold.blue(targetDate));
23285
23394
  printCommitsWithFiles(commits2, ctx.ignore, ctx.verbose);
23286
23395
  }
23287
23396
  function logNoCommits(lastInfo) {
23288
- console.log(chalk146.dim(noCommitsMessage(!!lastInfo)));
23397
+ console.log(chalk150.dim(noCommitsMessage(!!lastInfo)));
23289
23398
  }
23290
23399
 
23291
23400
  // src/commands/devlog/next.ts
@@ -23326,11 +23435,11 @@ function next2(options2) {
23326
23435
  import { execSync as execSync33 } from "child_process";
23327
23436
 
23328
23437
  // src/commands/devlog/repos/printReposTable.ts
23329
- import chalk147 from "chalk";
23438
+ import chalk151 from "chalk";
23330
23439
  function colorStatus(status2) {
23331
- if (status2 === "missing") return chalk147.red(status2);
23332
- if (status2 === "outdated") return chalk147.yellow(status2);
23333
- return chalk147.green(status2);
23440
+ if (status2 === "missing") return chalk151.red(status2);
23441
+ if (status2 === "outdated") return chalk151.yellow(status2);
23442
+ return chalk151.green(status2);
23334
23443
  }
23335
23444
  function formatRow(row3, nameWidth) {
23336
23445
  const devlog = (row3.lastDevlog ?? "-").padEnd(11);
@@ -23344,8 +23453,8 @@ function printReposTable(rows) {
23344
23453
  "Last Devlog".padEnd(11),
23345
23454
  "Status"
23346
23455
  ].join(" ");
23347
- console.log(chalk147.dim(header));
23348
- console.log(chalk147.dim("-".repeat(header.length)));
23456
+ console.log(chalk151.dim(header));
23457
+ console.log(chalk151.dim("-".repeat(header.length)));
23349
23458
  for (const row3 of rows) {
23350
23459
  console.log(formatRow(row3, nameWidth));
23351
23460
  }
@@ -23403,14 +23512,14 @@ function repos(options2) {
23403
23512
  // src/commands/devlog/skip.ts
23404
23513
  import { writeFileSync as writeFileSync30 } from "fs";
23405
23514
  import { join as join65 } from "path";
23406
- import chalk148 from "chalk";
23515
+ import chalk152 from "chalk";
23407
23516
  import { stringify as stringifyYaml3 } from "yaml";
23408
23517
  function getBlogConfigPath() {
23409
23518
  return join65(BLOG_REPO_ROOT, "assist.yml");
23410
23519
  }
23411
23520
  function skip2(date) {
23412
23521
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) {
23413
- console.log(chalk148.red("Invalid date format. Use YYYY-MM-DD"));
23522
+ console.log(chalk152.red("Invalid date format. Use YYYY-MM-DD"));
23414
23523
  process.exit(1);
23415
23524
  }
23416
23525
  const repoName = getRepoName();
@@ -23421,7 +23530,7 @@ function skip2(date) {
23421
23530
  const skipDays = skip3[repoName] ?? [];
23422
23531
  if (skipDays.includes(date)) {
23423
23532
  console.log(
23424
- chalk148.yellow(`${date} is already in skip list for ${repoName}`)
23533
+ chalk152.yellow(`${date} is already in skip list for ${repoName}`)
23425
23534
  );
23426
23535
  return;
23427
23536
  }
@@ -23431,20 +23540,20 @@ function skip2(date) {
23431
23540
  devlog.skip = skip3;
23432
23541
  config.devlog = devlog;
23433
23542
  writeFileSync30(configPath, stringifyYaml3(config, { lineWidth: 0 }));
23434
- console.log(chalk148.green(`Added ${date} to skip list for ${repoName}`));
23543
+ console.log(chalk152.green(`Added ${date} to skip list for ${repoName}`));
23435
23544
  }
23436
23545
 
23437
23546
  // src/commands/devlog/version.ts
23438
- import chalk149 from "chalk";
23547
+ import chalk153 from "chalk";
23439
23548
  function version() {
23440
23549
  const config = loadConfig();
23441
23550
  const name = getRepoName();
23442
23551
  const lastInfo = getLastVersionInfo(name, config);
23443
23552
  const lastVersion = lastInfo?.version ?? null;
23444
23553
  const nextVersion = lastVersion ? bumpVersion(lastVersion, "patch") : null;
23445
- console.log(`${chalk149.bold("name:")} ${name}`);
23446
- console.log(`${chalk149.bold("last:")} ${lastVersion ?? chalk149.dim("none")}`);
23447
- console.log(`${chalk149.bold("next:")} ${nextVersion ?? chalk149.dim("none")}`);
23554
+ console.log(`${chalk153.bold("name:")} ${name}`);
23555
+ console.log(`${chalk153.bold("last:")} ${lastVersion ?? chalk153.dim("none")}`);
23556
+ console.log(`${chalk153.bold("next:")} ${nextVersion ?? chalk153.dim("none")}`);
23448
23557
  }
23449
23558
 
23450
23559
  // src/commands/registerDevlog.ts
@@ -23469,7 +23578,7 @@ function registerDevlog(program) {
23469
23578
  // src/commands/dotnet/checkBuildLocks.ts
23470
23579
  import { closeSync as closeSync4, openSync as openSync5, readdirSync as readdirSync8 } from "fs";
23471
23580
  import { join as join66 } from "path";
23472
- import chalk150 from "chalk";
23581
+ import chalk154 from "chalk";
23473
23582
  var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "packages"]);
23474
23583
  function isLockedDll(debugDir) {
23475
23584
  let files;
@@ -23516,14 +23625,14 @@ function checkBuildLocks(startDir) {
23516
23625
  const locked = findFirstLockedDll(startDir ?? getSearchRoot());
23517
23626
  if (locked) {
23518
23627
  console.error(
23519
- chalk150.red("Build output locked (is VS debugging?): ") + locked
23628
+ chalk154.red("Build output locked (is VS debugging?): ") + locked
23520
23629
  );
23521
23630
  process.exit(1);
23522
23631
  }
23523
23632
  }
23524
23633
  async function checkBuildLocksCommand() {
23525
23634
  checkBuildLocks();
23526
- console.log(chalk150.green("No build locks detected"));
23635
+ console.log(chalk154.green("No build locks detected"));
23527
23636
  }
23528
23637
 
23529
23638
  // src/commands/dotnet/buildTree.ts
@@ -23622,30 +23731,30 @@ function escapeRegex(s) {
23622
23731
  }
23623
23732
 
23624
23733
  // src/commands/dotnet/printTree.ts
23625
- import chalk151 from "chalk";
23734
+ import chalk155 from "chalk";
23626
23735
  function printNodes(nodes, prefix2) {
23627
23736
  for (let i = 0; i < nodes.length; i++) {
23628
23737
  const isLast = i === nodes.length - 1;
23629
23738
  const connector = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
23630
23739
  const childPrefix = isLast ? " " : "\u2502 ";
23631
23740
  const isMissing = nodes[i].relativePath.startsWith("[MISSING]");
23632
- const label2 = isMissing ? chalk151.red(nodes[i].relativePath) : nodes[i].relativePath;
23741
+ const label2 = isMissing ? chalk155.red(nodes[i].relativePath) : nodes[i].relativePath;
23633
23742
  console.log(`${prefix2}${connector}${label2}`);
23634
23743
  printNodes(nodes[i].children, prefix2 + childPrefix);
23635
23744
  }
23636
23745
  }
23637
23746
  function printTree(tree, totalCount, solutions) {
23638
- console.log(chalk151.bold("\nProject Dependency Tree"));
23639
- console.log(chalk151.cyan(tree.relativePath));
23747
+ console.log(chalk155.bold("\nProject Dependency Tree"));
23748
+ console.log(chalk155.cyan(tree.relativePath));
23640
23749
  printNodes(tree.children, "");
23641
- console.log(chalk151.dim(`
23750
+ console.log(chalk155.dim(`
23642
23751
  ${totalCount} projects total (including root)`));
23643
- console.log(chalk151.bold("\nSolution Membership"));
23752
+ console.log(chalk155.bold("\nSolution Membership"));
23644
23753
  if (solutions.length === 0) {
23645
- console.log(chalk151.yellow(" Not found in any .sln"));
23754
+ console.log(chalk155.yellow(" Not found in any .sln"));
23646
23755
  } else {
23647
23756
  for (const sln of solutions) {
23648
- console.log(` ${chalk151.green(sln)}`);
23757
+ console.log(` ${chalk155.green(sln)}`);
23649
23758
  }
23650
23759
  }
23651
23760
  console.log();
@@ -23674,16 +23783,16 @@ function printJson(tree, totalCount, solutions) {
23674
23783
  // src/commands/dotnet/resolveCsproj.ts
23675
23784
  import { existsSync as existsSync54 } from "fs";
23676
23785
  import path37 from "path";
23677
- import chalk152 from "chalk";
23786
+ import chalk156 from "chalk";
23678
23787
  function resolveCsproj(csprojPath) {
23679
23788
  const resolved = path37.resolve(csprojPath);
23680
23789
  if (!existsSync54(resolved)) {
23681
- console.error(chalk152.red(`File not found: ${resolved}`));
23790
+ console.error(chalk156.red(`File not found: ${resolved}`));
23682
23791
  process.exit(1);
23683
23792
  }
23684
23793
  const repoRoot2 = findRepoRoot(path37.dirname(resolved));
23685
23794
  if (!repoRoot2) {
23686
- console.error(chalk152.red("Could not find git repository root"));
23795
+ console.error(chalk156.red("Could not find git repository root"));
23687
23796
  process.exit(1);
23688
23797
  }
23689
23798
  return { resolved, repoRoot: repoRoot2 };
@@ -23733,12 +23842,12 @@ function getChangedCsFiles(scope) {
23733
23842
  }
23734
23843
 
23735
23844
  // src/commands/dotnet/inSln.ts
23736
- import chalk153 from "chalk";
23845
+ import chalk157 from "chalk";
23737
23846
  async function inSln(csprojPath) {
23738
23847
  const { resolved, repoRoot: repoRoot2 } = resolveCsproj(csprojPath);
23739
23848
  const solutions = findContainingSolutions(resolved, repoRoot2);
23740
23849
  if (solutions.length === 0) {
23741
- console.log(chalk153.yellow("Not found in any .sln file"));
23850
+ console.log(chalk157.yellow("Not found in any .sln file"));
23742
23851
  process.exit(1);
23743
23852
  }
23744
23853
  for (const sln of solutions) {
@@ -23747,7 +23856,7 @@ async function inSln(csprojPath) {
23747
23856
  }
23748
23857
 
23749
23858
  // src/commands/dotnet/inspect.ts
23750
- import chalk159 from "chalk";
23859
+ import chalk163 from "chalk";
23751
23860
 
23752
23861
  // src/shared/formatElapsed.ts
23753
23862
  function formatElapsed(ms) {
@@ -23759,12 +23868,12 @@ function formatElapsed(ms) {
23759
23868
  }
23760
23869
 
23761
23870
  // src/commands/dotnet/displayIssues.ts
23762
- import chalk154 from "chalk";
23871
+ import chalk158 from "chalk";
23763
23872
  var SEVERITY_COLOR = {
23764
- ERROR: chalk154.red,
23765
- WARNING: chalk154.yellow,
23766
- SUGGESTION: chalk154.cyan,
23767
- HINT: chalk154.dim
23873
+ ERROR: chalk158.red,
23874
+ WARNING: chalk158.yellow,
23875
+ SUGGESTION: chalk158.cyan,
23876
+ HINT: chalk158.dim
23768
23877
  };
23769
23878
  function groupByFile(issues) {
23770
23879
  const byFile = /* @__PURE__ */ new Map();
@@ -23780,15 +23889,15 @@ function groupByFile(issues) {
23780
23889
  }
23781
23890
  function displayIssues(issues) {
23782
23891
  for (const [file, fileIssues] of groupByFile(issues)) {
23783
- console.log(chalk154.bold(file));
23892
+ console.log(chalk158.bold(file));
23784
23893
  for (const issue of fileIssues.sort((a, b) => a.line - b.line)) {
23785
- const color = SEVERITY_COLOR[issue.severity] ?? chalk154.white;
23894
+ const color = SEVERITY_COLOR[issue.severity] ?? chalk158.white;
23786
23895
  console.log(
23787
- ` ${chalk154.dim(`${issue.line}:`)} ${color(issue.severity)} [${issue.typeId}] ${issue.message}`
23896
+ ` ${chalk158.dim(`${issue.line}:`)} ${color(issue.severity)} [${issue.typeId}] ${issue.message}`
23788
23897
  );
23789
23898
  }
23790
23899
  }
23791
- console.log(chalk154.dim(`
23900
+ console.log(chalk158.dim(`
23792
23901
  ${issues.length} issue(s) found`));
23793
23902
  }
23794
23903
 
@@ -23847,12 +23956,12 @@ function filterIssues(issues, all, cliOnly, cliSuppress) {
23847
23956
  // src/commands/dotnet/resolveSolution.ts
23848
23957
  import { existsSync as existsSync55 } from "fs";
23849
23958
  import path38 from "path";
23850
- import chalk156 from "chalk";
23959
+ import chalk160 from "chalk";
23851
23960
 
23852
23961
  // src/commands/dotnet/findSolution.ts
23853
23962
  import { readdirSync as readdirSync10 } from "fs";
23854
23963
  import { dirname as dirname29, join as join67 } from "path";
23855
- import chalk155 from "chalk";
23964
+ import chalk159 from "chalk";
23856
23965
  function findSlnInDir(dir) {
23857
23966
  try {
23858
23967
  return readdirSync10(dir).filter((f) => f.endsWith(".sln")).map((f) => join67(dir, f));
@@ -23868,17 +23977,17 @@ function findSolution() {
23868
23977
  const slnFiles = findSlnInDir(current);
23869
23978
  if (slnFiles.length === 1) return slnFiles[0];
23870
23979
  if (slnFiles.length > 1) {
23871
- console.error(chalk155.red(`Multiple .sln files found in ${current}:`));
23980
+ console.error(chalk159.red(`Multiple .sln files found in ${current}:`));
23872
23981
  for (const f of slnFiles) console.error(` ${f}`);
23873
23982
  console.error(
23874
- chalk155.yellow("Specify which one: assist dotnet inspect <sln>")
23983
+ chalk159.yellow("Specify which one: assist dotnet inspect <sln>")
23875
23984
  );
23876
23985
  process.exit(1);
23877
23986
  }
23878
23987
  if (current === ceiling) break;
23879
23988
  current = dirname29(current);
23880
23989
  }
23881
- console.error(chalk155.red("No .sln file found between cwd and repo root"));
23990
+ console.error(chalk159.red("No .sln file found between cwd and repo root"));
23882
23991
  process.exit(1);
23883
23992
  }
23884
23993
 
@@ -23887,7 +23996,7 @@ function resolveSolution(sln) {
23887
23996
  if (sln) {
23888
23997
  const resolved = path38.resolve(sln);
23889
23998
  if (!existsSync55(resolved)) {
23890
- console.error(chalk156.red(`Solution file not found: ${resolved}`));
23999
+ console.error(chalk160.red(`Solution file not found: ${resolved}`));
23891
24000
  process.exit(1);
23892
24001
  }
23893
24002
  return resolved;
@@ -23929,14 +24038,14 @@ import { execSync as execSync35 } from "child_process";
23929
24038
  import { existsSync as existsSync56, readFileSync as readFileSync39, unlinkSync as unlinkSync10 } from "fs";
23930
24039
  import { tmpdir as tmpdir4 } from "os";
23931
24040
  import path39 from "path";
23932
- import chalk157 from "chalk";
24041
+ import chalk161 from "chalk";
23933
24042
  function assertJbInstalled() {
23934
24043
  try {
23935
24044
  execSync35("jb inspectcode --version", { stdio: "pipe" });
23936
24045
  } catch {
23937
- console.error(chalk157.red("jb is not installed. Install with:"));
24046
+ console.error(chalk161.red("jb is not installed. Install with:"));
23938
24047
  console.error(
23939
- chalk157.yellow(" dotnet tool install -g JetBrains.ReSharper.GlobalTools")
24048
+ chalk161.yellow(" dotnet tool install -g JetBrains.ReSharper.GlobalTools")
23940
24049
  );
23941
24050
  process.exit(1);
23942
24051
  }
@@ -23954,11 +24063,11 @@ function runInspectCode(slnPath, include, swea) {
23954
24063
  if (error && typeof error === "object" && "stderr" in error) {
23955
24064
  process.stderr.write(error.stderr);
23956
24065
  }
23957
- console.error(chalk157.red("jb inspectcode failed"));
24066
+ console.error(chalk161.red("jb inspectcode failed"));
23958
24067
  process.exit(1);
23959
24068
  }
23960
24069
  if (!existsSync56(reportPath)) {
23961
- console.error(chalk157.red("Report file not generated"));
24070
+ console.error(chalk161.red("Report file not generated"));
23962
24071
  process.exit(1);
23963
24072
  }
23964
24073
  const xml = readFileSync39(reportPath, "utf8");
@@ -23968,7 +24077,7 @@ function runInspectCode(slnPath, include, swea) {
23968
24077
 
23969
24078
  // src/commands/dotnet/runRoslynInspect.ts
23970
24079
  import { execSync as execSync36 } from "child_process";
23971
- import chalk158 from "chalk";
24080
+ import chalk162 from "chalk";
23972
24081
  function resolveMsbuildPath() {
23973
24082
  const { run: run4 } = loadConfig();
23974
24083
  const configs = resolveRunConfigs(run4, runConfigBaseDir());
@@ -23980,9 +24089,9 @@ function assertMsbuildInstalled() {
23980
24089
  try {
23981
24090
  execSync36(`"${msbuild}" -version`, { stdio: "pipe" });
23982
24091
  } catch {
23983
- console.error(chalk158.red(`msbuild not found at: ${msbuild}`));
24092
+ console.error(chalk162.red(`msbuild not found at: ${msbuild}`));
23984
24093
  console.error(
23985
- chalk158.yellow(
24094
+ chalk162.yellow(
23986
24095
  "Configure it via a 'build' run entry in .claude/assist.yml or add msbuild to PATH."
23987
24096
  )
23988
24097
  );
@@ -24029,17 +24138,17 @@ function runEngine(resolved, changedFiles2, options2) {
24029
24138
  // src/commands/dotnet/inspect.ts
24030
24139
  function logScope(changedFiles2) {
24031
24140
  if (changedFiles2 === null) {
24032
- console.log(chalk159.dim("Inspecting full solution..."));
24141
+ console.log(chalk163.dim("Inspecting full solution..."));
24033
24142
  } else {
24034
24143
  console.log(
24035
- chalk159.dim(`Inspecting ${changedFiles2.length} changed file(s)...`)
24144
+ chalk163.dim(`Inspecting ${changedFiles2.length} changed file(s)...`)
24036
24145
  );
24037
24146
  }
24038
24147
  }
24039
24148
  function reportResults(issues, elapsed) {
24040
24149
  if (issues.length > 0) displayIssues(issues);
24041
- else console.log(chalk159.green("No issues found"));
24042
- console.log(chalk159.dim(`Completed in ${formatElapsed(elapsed)}`));
24150
+ else console.log(chalk163.green("No issues found"));
24151
+ console.log(chalk163.dim(`Completed in ${formatElapsed(elapsed)}`));
24043
24152
  if (issues.length > 0) process.exit(1);
24044
24153
  }
24045
24154
  async function inspect(sln, options2) {
@@ -24050,7 +24159,7 @@ async function inspect(sln, options2) {
24050
24159
  const scope = parseScope(options2.scope);
24051
24160
  const changedFiles2 = getChangedCsFiles(scope);
24052
24161
  if (changedFiles2 !== null && changedFiles2.length === 0) {
24053
- console.log(chalk159.green("No changed .cs files found"));
24162
+ console.log(chalk163.green("No changed .cs files found"));
24054
24163
  return;
24055
24164
  }
24056
24165
  logScope(changedFiles2);
@@ -24925,25 +25034,25 @@ function fetchRepoCommitAuthors(org, repo, since) {
24925
25034
  }
24926
25035
 
24927
25036
  // src/commands/github/printCountTable.ts
24928
- import chalk160 from "chalk";
25037
+ import chalk164 from "chalk";
24929
25038
  function printCountTable(labelHeader, rows) {
24930
25039
  const labelWidth = Math.max(
24931
25040
  labelHeader.length,
24932
25041
  ...rows.map((row3) => row3.label.length)
24933
25042
  );
24934
25043
  const header = `${labelHeader.padEnd(labelWidth)} Commits`;
24935
- console.log(chalk160.dim(header));
24936
- console.log(chalk160.dim("-".repeat(header.length)));
25044
+ console.log(chalk164.dim(header));
25045
+ console.log(chalk164.dim("-".repeat(header.length)));
24937
25046
  for (const row3 of rows) {
24938
25047
  console.log(`${row3.label.padEnd(labelWidth)} ${row3.count}`);
24939
25048
  }
24940
25049
  }
24941
25050
 
24942
25051
  // src/commands/github/printRepoAuthorBreakdown.ts
24943
- import chalk161 from "chalk";
25052
+ import chalk165 from "chalk";
24944
25053
  function printRepoAuthorBreakdown(repos2) {
24945
25054
  for (const repo of repos2) {
24946
- console.log(chalk161.bold(repo.name));
25055
+ console.log(chalk165.bold(repo.name));
24947
25056
  const authorWidth = Math.max(
24948
25057
  0,
24949
25058
  ...repo.authors.map((a) => a.author.length)
@@ -25026,10 +25135,10 @@ function parseTopCount(value) {
25026
25135
  }
25027
25136
 
25028
25137
  // src/commands/github/issue/fixStructure/applyAndVerifySubtree.ts
25029
- import chalk163 from "chalk";
25138
+ import chalk167 from "chalk";
25030
25139
 
25031
25140
  // src/commands/github/issue/fixStructure/applyFixStructurePlan.ts
25032
- import chalk162 from "chalk";
25141
+ import chalk166 from "chalk";
25033
25142
 
25034
25143
  // src/commands/github/issue/fixStructure/removeIssueLabels.ts
25035
25144
  var MUTATION2 = `mutation($labelableId: ID!, $labelIds: [ID!]!) {
@@ -25066,7 +25175,7 @@ function writeLineNow(line) {
25066
25175
  // src/commands/github/issue/fixStructure/applyFixStructurePlan.ts
25067
25176
  function applyFixStructurePlan(plan2) {
25068
25177
  for (const entry of plan2.entries) {
25069
- const where = chalk162.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25178
+ const where = chalk166.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25070
25179
  const { typeChange, labelRemovals } = entry;
25071
25180
  if (typeChange) {
25072
25181
  writeLineNow(
@@ -25336,12 +25445,12 @@ function planSubtree(root2, context) {
25336
25445
  function applyAndVerifySubtree(target, plan2, context) {
25337
25446
  if (plan2.typeChangeCount === 0 && plan2.labelRemovalCount === 0) return;
25338
25447
  applyFixStructurePlan(plan2);
25339
- writeLineNow(chalk163.dim("Re-walking the subtree to confirm"));
25448
+ writeLineNow(chalk167.dim("Re-walking the subtree to confirm"));
25340
25449
  assertNoResidualDrift(
25341
25450
  planSubtree(fetchRootIssue(target), context),
25342
25451
  context.chain
25343
25452
  );
25344
- writeLineNow(chalk163.green("Subtree normalised"));
25453
+ writeLineNow(chalk167.green("Subtree normalised"));
25345
25454
  }
25346
25455
 
25347
25456
  // src/commands/github/issue/fixStructure/assertChainTypesExist.ts
@@ -25377,22 +25486,22 @@ function parseTypeChain(value) {
25377
25486
  }
25378
25487
 
25379
25488
  // src/commands/github/issue/fixStructure/printFixStructurePlan.ts
25380
- import chalk164 from "chalk";
25489
+ import chalk168 from "chalk";
25381
25490
  function annotate(entry) {
25382
25491
  const notes = [];
25383
25492
  if (entry.level === null) {
25384
- notes.push(chalk164.red("deeper than the leaf level"));
25493
+ notes.push(chalk168.red("deeper than the leaf level"));
25385
25494
  } else if (entry.typeChange) {
25386
25495
  notes.push(
25387
- chalk164.yellow(
25496
+ chalk168.yellow(
25388
25497
  `${entry.typeChange.from ?? "no type"} -> ${entry.typeChange.to}`
25389
25498
  )
25390
25499
  );
25391
25500
  } else {
25392
- notes.push(chalk164.dim(entry.issue.typeName ?? "no type"));
25501
+ notes.push(chalk168.dim(entry.issue.typeName ?? "no type"));
25393
25502
  }
25394
25503
  for (const label2 of entry.labelRemovals) {
25395
- notes.push(chalk164.yellow(`-${label2.name}`));
25504
+ notes.push(chalk168.yellow(`-${label2.name}`));
25396
25505
  }
25397
25506
  return notes;
25398
25507
  }
@@ -25400,22 +25509,22 @@ function formatCount(count10, noun) {
25400
25509
  return `${count10} ${noun}${count10 === 1 ? "" : "s"}`;
25401
25510
  }
25402
25511
  function printFixStructurePlan(plan2, chain2, apply) {
25403
- writeLineNow(chalk164.dim(`chain: ${chain2.join(" > ")}`));
25512
+ writeLineNow(chalk168.dim(`chain: ${chain2.join(" > ")}`));
25404
25513
  for (const entry of plan2.entries) {
25405
25514
  const indent3 = " ".repeat(entry.issue.depth);
25406
- const name = chalk164.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25515
+ const name = chalk168.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25407
25516
  writeLineNow(
25408
25517
  `${indent3}${name} ${entry.issue.title} [${annotate(entry).join(", ")}]`
25409
25518
  );
25410
25519
  }
25411
25520
  if (plan2.typeChangeCount === 0 && plan2.labelRemovalCount === 0) {
25412
- writeLineNow(chalk164.green("Nothing to change"));
25521
+ writeLineNow(chalk168.green("Nothing to change"));
25413
25522
  return;
25414
25523
  }
25415
25524
  writeLineNow(
25416
25525
  `${formatCount(plan2.typeChangeCount, "type change")}, ${formatCount(plan2.labelRemovalCount, "label removal")} planned`
25417
25526
  );
25418
- if (!apply) writeLineNow(chalk164.dim("Dry run \u2014 nothing written"));
25527
+ if (!apply) writeLineNow(chalk168.dim("Dry run \u2014 nothing written"));
25419
25528
  }
25420
25529
 
25421
25530
  // src/commands/github/issue/parseRepoSlug.ts
@@ -26772,7 +26881,7 @@ function registerGithub(program) {
26772
26881
  }
26773
26882
 
26774
26883
  // src/commands/jira/acceptanceCriteria.ts
26775
- import chalk165 from "chalk";
26884
+ import chalk169 from "chalk";
26776
26885
 
26777
26886
  // src/commands/jira/adfToText.ts
26778
26887
  function renderInline(node) {
@@ -26839,7 +26948,7 @@ function acceptanceCriteria(issueKey) {
26839
26948
  const parsed = fetchIssue(issueKey, field);
26840
26949
  const acValue = parsed?.fields?.[field];
26841
26950
  if (!acValue) {
26842
- console.log(chalk165.yellow(`No acceptance criteria found on ${issueKey}.`));
26951
+ console.log(chalk169.yellow(`No acceptance criteria found on ${issueKey}.`));
26843
26952
  return;
26844
26953
  }
26845
26954
  if (typeof acValue === "string") {
@@ -26905,14 +27014,14 @@ async function jiraAuth() {
26905
27014
  }
26906
27015
 
26907
27016
  // src/commands/jira/viewIssue.ts
26908
- import chalk166 from "chalk";
27017
+ import chalk170 from "chalk";
26909
27018
  function viewIssue2(issueKey) {
26910
27019
  const parsed = fetchIssue(issueKey, "summary,description");
26911
27020
  const fields = parsed?.fields;
26912
27021
  const summary = fields?.summary;
26913
27022
  const description = fields?.description;
26914
27023
  if (summary) {
26915
- console.log(chalk166.bold(summary));
27024
+ console.log(chalk170.bold(summary));
26916
27025
  }
26917
27026
  if (description) {
26918
27027
  if (summary) console.log();
@@ -26926,7 +27035,7 @@ function viewIssue2(issueKey) {
26926
27035
  }
26927
27036
  if (!summary && !description) {
26928
27037
  console.log(
26929
- chalk166.yellow(`No summary or description found on ${issueKey}.`)
27038
+ chalk170.yellow(`No summary or description found on ${issueKey}.`)
26930
27039
  );
26931
27040
  }
26932
27041
  }
@@ -26961,7 +27070,7 @@ import { randomUUID as randomUUID11 } from "crypto";
26961
27070
 
26962
27071
  // src/commands/review/checkoutPr.ts
26963
27072
  import { execFileSync as execFileSync18 } from "child_process";
26964
- import chalk167 from "chalk";
27073
+ import chalk171 from "chalk";
26965
27074
 
26966
27075
  // src/commands/review/clearStalePrBranch.ts
26967
27076
  var tipSetFromRemote = /^branch: (Created from|Reset to)|^fetch\b|: Fast-forward$/;
@@ -27699,11 +27808,11 @@ function failCheckout(number, headRef, stale, from) {
27699
27808
  gitSyncOrNull(process.cwd(), ["checkout", "--quiet", from]);
27700
27809
  if (headRef && stale === "local-work")
27701
27810
  console.error(
27702
- chalk167.red(
27811
+ chalk171.red(
27703
27812
  `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.`
27704
27813
  )
27705
27814
  );
27706
- console.error(chalk167.red(`gh pr checkout ${number} failed; aborting.`));
27815
+ console.error(chalk171.red(`gh pr checkout ${number} failed; aborting.`));
27707
27816
  process.exit(1);
27708
27817
  }
27709
27818
  async function checkoutPr(number) {
@@ -27850,18 +27959,18 @@ function registerList(program) {
27850
27959
  }
27851
27960
 
27852
27961
  // src/commands/litellm/listModels.ts
27853
- import chalk169 from "chalk";
27962
+ import chalk173 from "chalk";
27854
27963
 
27855
27964
  // src/commands/litellm/resolveLitellmConfig.ts
27856
- import chalk168 from "chalk";
27965
+ import chalk172 from "chalk";
27857
27966
  function resolveLitellmConfig() {
27858
27967
  const { config, missing } = readLitellmConfig();
27859
27968
  if (!config) {
27860
- console.error(chalk168.red("LiteLLM is not configured"));
27969
+ console.error(chalk172.red("LiteLLM is not configured"));
27861
27970
  for (const key of missing) {
27862
27971
  const entry = litellmConfigHelp.find((help) => help.key === key);
27863
27972
  console.error(
27864
- chalk168.red(` ${key} is not set. Set it with: ${entry?.setter}`)
27973
+ chalk172.red(` ${key} is not set. Set it with: ${entry?.setter}`)
27865
27974
  );
27866
27975
  }
27867
27976
  process.exit(1);
@@ -27887,13 +27996,13 @@ async function listModels(options2) {
27887
27996
  } catch (error) {
27888
27997
  const reason4 = error instanceof Error ? error.message : String(error);
27889
27998
  console.error(
27890
- chalk169.red(`Failed to reach LiteLLM at ${baseUrl}: ${reason4}`)
27999
+ chalk173.red(`Failed to reach LiteLLM at ${baseUrl}: ${reason4}`)
27891
28000
  );
27892
28001
  process.exit(1);
27893
28002
  }
27894
28003
  const body = await response.text();
27895
28004
  if (!response.ok) {
27896
- console.error(chalk169.red(`LiteLLM returned ${response.status}: ${body}`));
28005
+ console.error(chalk173.red(`LiteLLM returned ${response.status}: ${body}`));
27897
28006
  process.exit(1);
27898
28007
  }
27899
28008
  if (options2.json) {
@@ -27913,15 +28022,15 @@ function registerLitellm(program) {
27913
28022
  // src/commands/mermaidExport.ts
27914
28023
  import { mkdirSync as mkdirSync20, readdirSync as readdirSync11 } from "fs";
27915
28024
  import { resolve as resolve20 } from "path";
27916
- import chalk172 from "chalk";
28025
+ import chalk176 from "chalk";
27917
28026
 
27918
28027
  // src/commands/mermaid/exportFile.ts
27919
28028
  import { readFileSync as readFileSync41, writeFileSync as writeFileSync33 } from "fs";
27920
28029
  import { basename as basename20, extname as extname4, resolve as resolve19 } from "path";
27921
- import chalk171 from "chalk";
28030
+ import chalk175 from "chalk";
27922
28031
 
27923
28032
  // src/commands/mermaid/renderBlock.ts
27924
- import chalk170 from "chalk";
28033
+ import chalk174 from "chalk";
27925
28034
  async function renderBlock(krokiUrl, source) {
27926
28035
  const response = await fetch(`${krokiUrl}/mermaid/svg`, {
27927
28036
  method: "POST",
@@ -27930,7 +28039,7 @@ async function renderBlock(krokiUrl, source) {
27930
28039
  });
27931
28040
  if (!response.ok) {
27932
28041
  console.error(
27933
- chalk170.red(
28042
+ chalk174.red(
27934
28043
  `Kroki request failed: ${response.status} ${response.statusText}`
27935
28044
  )
27936
28045
  );
@@ -27948,19 +28057,19 @@ async function exportFile(file, outDir, krokiUrl, onlyIndex) {
27948
28057
  if (onlyIndex !== void 0) {
27949
28058
  if (onlyIndex < 1 || onlyIndex > blocks.length) {
27950
28059
  console.error(
27951
- chalk171.red(
28060
+ chalk175.red(
27952
28061
  `${file}: --index ${onlyIndex} out of range (file has ${blocks.length} diagram(s))`
27953
28062
  )
27954
28063
  );
27955
28064
  process.exit(1);
27956
28065
  }
27957
28066
  console.log(
27958
- chalk171.gray(
28067
+ chalk175.gray(
27959
28068
  `${file} \u2014 rendering diagram ${onlyIndex} of ${blocks.length}`
27960
28069
  )
27961
28070
  );
27962
28071
  } else {
27963
- console.log(chalk171.gray(`${file} \u2014 ${blocks.length} diagram(s)`));
28072
+ console.log(chalk175.gray(`${file} \u2014 ${blocks.length} diagram(s)`));
27964
28073
  }
27965
28074
  for (const [i, source] of blocks.entries()) {
27966
28075
  const idx = i + 1;
@@ -27968,7 +28077,7 @@ async function exportFile(file, outDir, krokiUrl, onlyIndex) {
27968
28077
  const outPath = resolve19(outDir, `${stem}-${idx}.svg`);
27969
28078
  const svg = await renderBlock(krokiUrl, source);
27970
28079
  writeFileSync33(outPath, svg, "utf8");
27971
- console.log(chalk171.green(` \u2192 ${outPath}`));
28080
+ console.log(chalk175.green(` \u2192 ${outPath}`));
27972
28081
  }
27973
28082
  }
27974
28083
  function extractMermaidBlocks(markdown) {
@@ -27984,18 +28093,18 @@ async function mermaidExport(file, options2 = {}) {
27984
28093
  if (options2.index !== void 0) {
27985
28094
  if (!Number.isInteger(options2.index) || options2.index < 1) {
27986
28095
  console.error(
27987
- chalk172.red(`--index must be a positive integer (got ${options2.index})`)
28096
+ chalk176.red(`--index must be a positive integer (got ${options2.index})`)
27988
28097
  );
27989
28098
  process.exit(1);
27990
28099
  }
27991
28100
  if (!file) {
27992
- console.error(chalk172.red("--index requires a file argument"));
28101
+ console.error(chalk176.red("--index requires a file argument"));
27993
28102
  process.exit(1);
27994
28103
  }
27995
28104
  }
27996
28105
  const files = file ? [file] : readdirSync11(process.cwd()).filter((name) => name.toLowerCase().endsWith(".md")).sort();
27997
28106
  if (files.length === 0) {
27998
- console.log(chalk172.gray("No markdown files found in current directory."));
28107
+ console.log(chalk176.gray("No markdown files found in current directory."));
27999
28108
  return;
28000
28109
  }
28001
28110
  for (const f of files) {
@@ -28141,7 +28250,7 @@ function extractToSave(details, cwd = process.cwd()) {
28141
28250
  }
28142
28251
 
28143
28252
  // src/commands/miro/keptTexts.ts
28144
- import chalk173 from "chalk";
28253
+ import chalk177 from "chalk";
28145
28254
 
28146
28255
  // src/commands/miro/applyIgnore.ts
28147
28256
  function applyIgnore(texts, ignore3) {
@@ -28180,7 +28289,7 @@ function warnUnmatched(file, unmatched) {
28180
28289
  if (unmatched.length === 0) return;
28181
28290
  const entries = unmatched.map((entry) => ` - ${entry}`).join("\n");
28182
28291
  console.error(
28183
- chalk173.yellow(
28292
+ chalk177.yellow(
28184
28293
  `${unmatched.length} ${unmatched.length === 1 ? "entry" : "entries"} in ${file} matched no box text:
28185
28294
  ${entries}`
28186
28295
  )
@@ -28381,7 +28490,7 @@ function readMiroItems(file) {
28381
28490
  }
28382
28491
 
28383
28492
  // src/commands/miro/resolveExtractOptions.ts
28384
- import chalk174 from "chalk";
28493
+ import chalk178 from "chalk";
28385
28494
 
28386
28495
  // src/commands/miro/extractLayers.ts
28387
28496
  function extractsIn(layer) {
@@ -28459,7 +28568,7 @@ function resolveExtractOptions(name, options2, paths) {
28459
28568
  paths.cwd,
28460
28569
  paths.globalConfigPath
28461
28570
  );
28462
- console.error(chalk174.dim(`Extract "${name}" from ${resolved.from}`));
28571
+ console.error(chalk178.dim(`Extract "${name}" from ${resolved.from}`));
28463
28572
  return resolved.options;
28464
28573
  }
28465
28574
 
@@ -28561,7 +28670,7 @@ function registerMiro(program) {
28561
28670
  import { mkdir as mkdir6 } from "fs/promises";
28562
28671
  import { createServer as createServer2 } from "http";
28563
28672
  import { dirname as dirname35 } from "path";
28564
- import chalk176 from "chalk";
28673
+ import chalk180 from "chalk";
28565
28674
 
28566
28675
  // src/commands/netcap/corsHeaders.ts
28567
28676
  var corsHeaders = {
@@ -28640,7 +28749,7 @@ function createNetcapHandler(options2) {
28640
28749
  import { cp as cp4, readFile as readFile7, writeFile as writeFile6 } from "fs/promises";
28641
28750
  import { networkInterfaces } from "os";
28642
28751
  import { join as join74 } from "path";
28643
- import chalk175 from "chalk";
28752
+ import chalk179 from "chalk";
28644
28753
 
28645
28754
  // src/commands/netcap/netcapExtensionDir.ts
28646
28755
  import { dirname as dirname34, join as join73 } from "path";
@@ -28684,7 +28793,7 @@ async function prepareExtensionForLoad(port, filter = "") {
28684
28793
  const host = lanIPv4();
28685
28794
  if (!host) {
28686
28795
  console.log(
28687
- chalk175.yellow("could not determine the WSL IP for the extension")
28796
+ chalk179.yellow("could not determine the WSL IP for the extension")
28688
28797
  );
28689
28798
  await configureBackground(source, "127.0.0.1", port, filter);
28690
28799
  return source;
@@ -28695,7 +28804,7 @@ async function prepareExtensionForLoad(port, filter = "") {
28695
28804
  return WSL_WINDOWS_PATH3;
28696
28805
  } catch {
28697
28806
  console.log(
28698
- chalk175.yellow(`could not copy extension to ${WSL_WINDOWS_PATH3}`)
28807
+ chalk179.yellow(`could not copy extension to ${WSL_WINDOWS_PATH3}`)
28699
28808
  );
28700
28809
  return source;
28701
28810
  }
@@ -28728,30 +28837,30 @@ async function netcap(options2) {
28728
28837
  let count10 = 0;
28729
28838
  const handler = createNetcapHandler({
28730
28839
  outPath,
28731
- onPing: () => console.log(chalk176.dim("ping from extension")),
28840
+ onPing: () => console.log(chalk180.dim("ping from extension")),
28732
28841
  onCapture: (entry) => {
28733
28842
  count10 += 1;
28734
28843
  console.log(
28735
- chalk176.green(`captured #${count10}`),
28736
- chalk176.dim(`${entry.method ?? "?"} ${entry.url ?? "?"}`)
28844
+ chalk180.green(`captured #${count10}`),
28845
+ chalk180.dim(`${entry.method ?? "?"} ${entry.url ?? "?"}`)
28737
28846
  );
28738
28847
  }
28739
28848
  });
28740
28849
  const server = createServer2(handler);
28741
28850
  server.listen(port, () => {
28742
28851
  console.log(
28743
- chalk176.bold(`netcap receiver listening on http://127.0.0.1:${port}`)
28852
+ chalk180.bold(`netcap receiver listening on http://127.0.0.1:${port}`)
28744
28853
  );
28745
- console.log(chalk176.dim(`appending captures to ${outPath}`));
28854
+ console.log(chalk180.dim(`appending captures to ${outPath}`));
28746
28855
  if (filter)
28747
- console.log(chalk176.dim(`forwarding only URLs matching "${filter}"`));
28748
- console.log(chalk176.dim(`load the unpacked extension from ${extensionPath}`));
28749
- console.log(chalk176.dim("press Ctrl-C to stop"));
28856
+ console.log(chalk180.dim(`forwarding only URLs matching "${filter}"`));
28857
+ console.log(chalk180.dim(`load the unpacked extension from ${extensionPath}`));
28858
+ console.log(chalk180.dim("press Ctrl-C to stop"));
28750
28859
  });
28751
28860
  process.on("SIGINT", () => {
28752
28861
  server.close();
28753
28862
  console.log(
28754
- chalk176.bold(
28863
+ chalk180.bold(
28755
28864
  `
28756
28865
  netcap stopped \u2014 captured ${count10} ${count10 === 1 ? "entry" : "entries"} to ${outPath}`
28757
28866
  )
@@ -28763,7 +28872,7 @@ netcap stopped \u2014 captured ${count10} ${count10 === 1 ? "entry" : "entries"}
28763
28872
  // src/commands/netcap/netcapExtract.ts
28764
28873
  import { writeFileSync as writeFileSync35 } from "fs";
28765
28874
  import { join as join77 } from "path";
28766
- import chalk177 from "chalk";
28875
+ import chalk181 from "chalk";
28767
28876
 
28768
28877
  // src/commands/netcap/extractPostsFromCapture.ts
28769
28878
  import { readFileSync as readFileSync44 } from "fs";
@@ -29211,8 +29320,8 @@ function netcapExtract(file) {
29211
29320
  writeFileSync35(outFile, `${JSON.stringify(posts, null, 2)}
29212
29321
  `);
29213
29322
  console.log(
29214
- chalk177.green(`extracted ${posts.length} posts`),
29215
- chalk177.dim(`-> ${outFile}`)
29323
+ chalk181.green(`extracted ${posts.length} posts`),
29324
+ chalk181.dim(`-> ${outFile}`)
29216
29325
  );
29217
29326
  }
29218
29327
 
@@ -29233,7 +29342,7 @@ function registerNetcap(program) {
29233
29342
  }
29234
29343
 
29235
29344
  // src/commands/news/add.ts
29236
- import chalk178 from "chalk";
29345
+ import chalk182 from "chalk";
29237
29346
  import enquirer8 from "enquirer";
29238
29347
  async function add2(url) {
29239
29348
  if (!url) {
@@ -29252,19 +29361,51 @@ async function add2(url) {
29252
29361
  });
29253
29362
  url = response.url;
29254
29363
  }
29255
- const { orm } = await getReady();
29256
- const added = await addFeed(orm, url);
29364
+ const added = await addFeed(await getDb(), url);
29257
29365
  if (!added) {
29258
- console.log(chalk178.yellow("Feed already exists"));
29366
+ console.log(chalk182.yellow("Feed already exists"));
29259
29367
  return;
29260
29368
  }
29261
- console.log(chalk178.green(`Added feed: ${url}`));
29369
+ console.log(chalk182.green(`Added feed: ${url}`));
29370
+ }
29371
+
29372
+ // src/commands/news/list.ts
29373
+ import chalk183 from "chalk";
29374
+ async function list3() {
29375
+ const urls = await listFeeds(await getDb());
29376
+ if (urls.length === 0) {
29377
+ console.log(chalk183.dim("No feeds; add one with assist news add <url>"));
29378
+ return;
29379
+ }
29380
+ for (const url of urls) console.log(url);
29381
+ }
29382
+
29383
+ // src/commands/news/remove.ts
29384
+ import chalk184 from "chalk";
29385
+
29386
+ // src/commands/backlog/removeFeed.ts
29387
+ import { eq as eq43 } from "drizzle-orm";
29388
+ async function removeFeed(db, url) {
29389
+ const deleted = await db.delete(feeds).where(eq43(feeds.url, url)).returning({ id: feeds.id });
29390
+ return deleted.length > 0;
29391
+ }
29392
+
29393
+ // src/commands/news/remove.ts
29394
+ async function remove(url) {
29395
+ const removed = await removeFeed(await getDb(), url);
29396
+ if (!removed) {
29397
+ console.log(chalk184.yellow(`No feed matches ${url}`));
29398
+ return;
29399
+ }
29400
+ console.log(chalk184.green(`Removed feed: ${url}`));
29262
29401
  }
29263
29402
 
29264
29403
  // src/commands/registerNews.ts
29265
29404
  function registerNews(program) {
29266
29405
  const newsCommand = program.command("news").description("Manage RSS news feeds");
29267
- newsCommand.command("add").description("Add an RSS feed URL").argument("<url>", "RSS feed URL").action(add2);
29406
+ newsCommand.command("add").description("Add an RSS feed URL to news.feeds").argument("<url>", "RSS feed URL").action(add2);
29407
+ newsCommand.command("list").description("List the RSS feed URLs in news.feeds").action(list3);
29408
+ newsCommand.command("remove").description("Remove an RSS feed URL from news.feeds").argument("<url>", "RSS feed URL").action(remove);
29268
29409
  configHelp(newsCommand, newsConfigHelp);
29269
29410
  }
29270
29411
 
@@ -29306,7 +29447,7 @@ function registerPiHook(program) {
29306
29447
  }
29307
29448
 
29308
29449
  // src/commands/prompts/printPromptsTable.ts
29309
- import chalk179 from "chalk";
29450
+ import chalk185 from "chalk";
29310
29451
  function truncate(str, max) {
29311
29452
  if (str.length <= max) return str;
29312
29453
  return `${str.slice(0, max - 1)}\u2026`;
@@ -29324,14 +29465,14 @@ function printPromptsTable(rows) {
29324
29465
  "Command".padEnd(commandWidth),
29325
29466
  "Repos"
29326
29467
  ].join(" ");
29327
- console.log(chalk179.dim(header));
29328
- console.log(chalk179.dim("-".repeat(header.length)));
29468
+ console.log(chalk185.dim(header));
29469
+ console.log(chalk185.dim("-".repeat(header.length)));
29329
29470
  for (const row3 of rows) {
29330
29471
  const count10 = String(row3.count).padStart(countWidth);
29331
29472
  const tool = row3.tool.padEnd(toolWidth);
29332
29473
  const command = truncate(row3.command, 60).padEnd(commandWidth);
29333
29474
  console.log(
29334
- `${chalk179.yellow(count10)} ${tool} ${command} ${chalk179.dim(row3.repos)}`
29475
+ `${chalk185.yellow(count10)} ${tool} ${command} ${chalk185.dim(row3.repos)}`
29335
29476
  );
29336
29477
  }
29337
29478
  }
@@ -29366,13 +29507,13 @@ import { execSync as execSync39 } from "child_process";
29366
29507
  import enquirer9 from "enquirer";
29367
29508
 
29368
29509
  // src/commands/prs/prs/displayPaginated/printPr.ts
29369
- import chalk180 from "chalk";
29510
+ import chalk186 from "chalk";
29370
29511
  var STATUS_MAP = {
29371
- MERGED: (pr) => pr.mergedAt ? { label: chalk180.magenta("merged"), date: pr.mergedAt } : null,
29372
- CLOSED: (pr) => pr.closedAt ? { label: chalk180.red("closed"), date: pr.closedAt } : null
29512
+ MERGED: (pr) => pr.mergedAt ? { label: chalk186.magenta("merged"), date: pr.mergedAt } : null,
29513
+ CLOSED: (pr) => pr.closedAt ? { label: chalk186.red("closed"), date: pr.closedAt } : null
29373
29514
  };
29374
29515
  function defaultStatus(pr) {
29375
- return { label: chalk180.green("opened"), date: pr.createdAt };
29516
+ return { label: chalk186.green("opened"), date: pr.createdAt };
29376
29517
  }
29377
29518
  function getStatus2(pr) {
29378
29519
  return STATUS_MAP[pr.state]?.(pr) ?? defaultStatus(pr);
@@ -29381,11 +29522,11 @@ function formatDate(dateStr) {
29381
29522
  return new Date(dateStr).toISOString().split("T")[0];
29382
29523
  }
29383
29524
  function formatPrHeader(pr, status2) {
29384
- return `${chalk180.cyan(`#${pr.number}`)} ${pr.title} ${chalk180.dim(`(${pr.author.login},`)} ${status2.label} ${chalk180.dim(`${formatDate(status2.date)})`)}`;
29525
+ return `${chalk186.cyan(`#${pr.number}`)} ${pr.title} ${chalk186.dim(`(${pr.author.login},`)} ${status2.label} ${chalk186.dim(`${formatDate(status2.date)})`)}`;
29385
29526
  }
29386
29527
  function logPrDetails(pr) {
29387
29528
  console.log(
29388
- chalk180.dim(` ${pr.changedFiles.toLocaleString()} files | ${pr.url}`)
29529
+ chalk186.dim(` ${pr.changedFiles.toLocaleString()} files | ${pr.url}`)
29389
29530
  );
29390
29531
  console.log();
29391
29532
  }
@@ -29870,13 +30011,13 @@ function agentFooter(unresolvedCount) {
29870
30011
  }
29871
30012
 
29872
30013
  // src/commands/prs/listComments/commentStyle.ts
29873
- import chalk181 from "chalk";
30014
+ import chalk187 from "chalk";
29874
30015
  var plain = (text17) => text17;
29875
30016
  function colouredState(state) {
29876
30017
  const label2 = `[${state}]`;
29877
- if (state === "APPROVED") return chalk181.green(label2);
29878
- if (state === "CHANGES_REQUESTED") return chalk181.red(label2);
29879
- return chalk181.yellow(label2);
30018
+ if (state === "APPROVED") return chalk187.green(label2);
30019
+ if (state === "CHANGES_REQUESTED") return chalk187.red(label2);
30020
+ return chalk187.yellow(label2);
29880
30021
  }
29881
30022
  function commentStyle() {
29882
30023
  if (isClaudeCode()) {
@@ -29890,9 +30031,9 @@ function commentStyle() {
29890
30031
  };
29891
30032
  }
29892
30033
  return {
29893
- cyan: chalk181.cyan,
29894
- bold: chalk181.bold,
29895
- dim: chalk181.dim,
30034
+ cyan: chalk187.cyan,
30035
+ bold: chalk187.bold,
30036
+ dim: chalk187.dim,
29896
30037
  state: colouredState,
29897
30038
  diffHunk: true,
29898
30039
  agent: false
@@ -31176,16 +31317,16 @@ function buildPrsStatusReport(repoArguments, now = Date.now()) {
31176
31317
  }
31177
31318
 
31178
31319
  // src/commands/prs/status/printPrsStatus.ts
31179
- import chalk183 from "chalk";
31320
+ import chalk189 from "chalk";
31180
31321
 
31181
31322
  // src/commands/prs/status/printPrStatus.ts
31182
- import chalk182 from "chalk";
31323
+ import chalk188 from "chalk";
31183
31324
  function flags(pr) {
31184
31325
  const markers = [];
31185
31326
  if (pr.isDraft) markers.push("draft");
31186
31327
  if (pr.isDoNotMerge) markers.push("do not merge");
31187
31328
  if (pr.isBot) markers.push("bot");
31188
- return markers.length ? ` ${chalk182.yellow(`[${markers.join(", ")}]`)}` : "";
31329
+ return markers.length ? ` ${chalk188.yellow(`[${markers.join(", ")}]`)}` : "";
31189
31330
  }
31190
31331
  function updated(pr) {
31191
31332
  return pr.ageHours === null ? "updated unknown" : `updated ${pr.age} ago`;
@@ -31199,35 +31340,35 @@ function reviewLine(pr) {
31199
31340
  function checkLines(pr) {
31200
31341
  const lines2 = [];
31201
31342
  if (pr.checks.failing.length) {
31202
- lines2.push(chalk182.red(`failing: ${pr.checks.failing.join(", ")}`));
31343
+ lines2.push(chalk188.red(`failing: ${pr.checks.failing.join(", ")}`));
31203
31344
  }
31204
31345
  if (pr.checks.pending.length) {
31205
- lines2.push(chalk182.yellow(`pending: ${pr.checks.pending.join(", ")}`));
31346
+ lines2.push(chalk188.yellow(`pending: ${pr.checks.pending.join(", ")}`));
31206
31347
  }
31207
31348
  return lines2;
31208
31349
  }
31209
31350
  function threadsLine(pr) {
31210
31351
  if (pr.unresolvedThreads === null) {
31211
- return chalk182.dim("unresolved comments: unknown");
31352
+ return chalk188.dim("unresolved comments: unknown");
31212
31353
  }
31213
31354
  if (pr.unresolvedThreads === 0) return null;
31214
- return chalk182.yellow(`unresolved comments: ${pr.unresolvedThreads}`);
31355
+ return chalk188.yellow(`unresolved comments: ${pr.unresolvedThreads}`);
31215
31356
  }
31216
31357
  function mergeableLine(pr) {
31217
- if (pr.mergeable === "CONFLICTING") return chalk182.red("conflicting");
31358
+ if (pr.mergeable === "CONFLICTING") return chalk188.red("conflicting");
31218
31359
  if (pr.mergeable === "MERGEABLE") return null;
31219
- return chalk182.dim(`mergeable: ${pr.mergeable.toLowerCase()}`);
31360
+ return chalk188.dim(`mergeable: ${pr.mergeable.toLowerCase()}`);
31220
31361
  }
31221
31362
  function printPrStatus(pr) {
31222
31363
  console.log(
31223
- ` ${chalk182.cyan(`#${pr.number}`)} ${pr.title} ${chalk182.dim(`(${pr.author}, ${updated(pr)})`)}${flags(pr)}`
31364
+ ` ${chalk188.cyan(`#${pr.number}`)} ${pr.title} ${chalk188.dim(`(${pr.author}, ${updated(pr)})`)}${flags(pr)}`
31224
31365
  );
31225
31366
  const details = [
31226
31367
  reviewLine(pr),
31227
31368
  ...checkLines(pr),
31228
31369
  threadsLine(pr),
31229
31370
  mergeableLine(pr),
31230
- chalk182.dim(pr.url)
31371
+ chalk188.dim(pr.url)
31231
31372
  ];
31232
31373
  for (const detail of details) {
31233
31374
  if (detail) console.log(` ${detail}`);
@@ -31238,17 +31379,17 @@ function printPrStatus(pr) {
31238
31379
  function printPrsStatus(report) {
31239
31380
  for (const repo of report.repos) {
31240
31381
  const count10 = repo.pullRequests.length;
31241
- console.log(`${chalk183.bold(repo.repo)} ${chalk183.dim(`(${count10} open)`)}`);
31382
+ console.log(`${chalk189.bold(repo.repo)} ${chalk189.dim(`(${count10} open)`)}`);
31242
31383
  for (const pr of repo.pullRequests) {
31243
31384
  printPrStatus(pr);
31244
31385
  }
31245
- if (count10 === 0) console.log(chalk183.dim(" no open pull requests"));
31386
+ if (count10 === 0) console.log(chalk189.dim(" no open pull requests"));
31246
31387
  console.log();
31247
31388
  }
31248
31389
  if (report.errors.length === 0) return;
31249
- console.log(chalk183.bold("Errors"));
31390
+ console.log(chalk189.bold("Errors"));
31250
31391
  for (const failure of report.errors) {
31251
- console.log(` ${chalk183.red(failure.repo)}: ${failure.error}`);
31392
+ console.log(` ${chalk189.red(failure.repo)}: ${failure.error}`);
31252
31393
  }
31253
31394
  console.log();
31254
31395
  }
@@ -31470,10 +31611,10 @@ function registerPrs(program) {
31470
31611
  }
31471
31612
 
31472
31613
  // src/commands/ravendb/ravendbAuth.ts
31473
- import chalk189 from "chalk";
31614
+ import chalk195 from "chalk";
31474
31615
 
31475
31616
  // src/shared/createConnectionAuth.ts
31476
- import chalk184 from "chalk";
31617
+ import chalk190 from "chalk";
31477
31618
  function listConnections(connections, format3) {
31478
31619
  if (connections.length === 0) {
31479
31620
  console.log("No connections configured.");
@@ -31486,7 +31627,7 @@ function listConnections(connections, format3) {
31486
31627
  function removeConnection(connections, name, save) {
31487
31628
  const filtered = connections.filter((c) => c.name !== name);
31488
31629
  if (filtered.length === connections.length) {
31489
- console.error(chalk184.red(`Connection "${name}" not found.`));
31630
+ console.error(chalk190.red(`Connection "${name}" not found.`));
31490
31631
  process.exit(1);
31491
31632
  }
31492
31633
  save(filtered);
@@ -31532,15 +31673,15 @@ function saveConnections(connections) {
31532
31673
  }
31533
31674
 
31534
31675
  // src/commands/ravendb/promptConnection.ts
31535
- import chalk187 from "chalk";
31676
+ import chalk193 from "chalk";
31536
31677
 
31537
31678
  // src/commands/ravendb/selectOpSecret.ts
31538
- import chalk186 from "chalk";
31679
+ import chalk192 from "chalk";
31539
31680
  import Enquirer2 from "enquirer";
31540
31681
 
31541
31682
  // src/commands/ravendb/searchItems.ts
31542
31683
  import { execSync as execSync46 } from "child_process";
31543
- import chalk185 from "chalk";
31684
+ import chalk191 from "chalk";
31544
31685
  function opExec(args) {
31545
31686
  return execSync46(`op ${args}`, {
31546
31687
  encoding: "utf8",
@@ -31553,7 +31694,7 @@ function searchItems(search2) {
31553
31694
  items2 = JSON.parse(opExec("item list --format=json"));
31554
31695
  } catch {
31555
31696
  console.error(
31556
- chalk185.red(
31697
+ chalk191.red(
31557
31698
  "Failed to search 1Password. Ensure the CLI is installed and you are signed in."
31558
31699
  )
31559
31700
  );
@@ -31567,7 +31708,7 @@ function getItemFields(itemId2) {
31567
31708
  const item = JSON.parse(opExec(`item get "${itemId2}" --format=json`));
31568
31709
  return item.fields.filter((f) => f.reference && f.label);
31569
31710
  } catch {
31570
- console.error(chalk185.red("Failed to get item details from 1Password."));
31711
+ console.error(chalk191.red("Failed to get item details from 1Password."));
31571
31712
  process.exit(1);
31572
31713
  }
31573
31714
  }
@@ -31586,7 +31727,7 @@ async function selectOpSecret(searchTerm) {
31586
31727
  }).run();
31587
31728
  const items2 = searchItems(search2);
31588
31729
  if (items2.length === 0) {
31589
- console.error(chalk186.red(`No items found matching "${search2}".`));
31730
+ console.error(chalk192.red(`No items found matching "${search2}".`));
31590
31731
  process.exit(1);
31591
31732
  }
31592
31733
  const itemId2 = await selectOne(
@@ -31595,7 +31736,7 @@ async function selectOpSecret(searchTerm) {
31595
31736
  );
31596
31737
  const fields = getItemFields(itemId2);
31597
31738
  if (fields.length === 0) {
31598
- console.error(chalk186.red("No fields with references found on this item."));
31739
+ console.error(chalk192.red("No fields with references found on this item."));
31599
31740
  process.exit(1);
31600
31741
  }
31601
31742
  const ref = await selectOne(
@@ -31609,7 +31750,7 @@ async function selectOpSecret(searchTerm) {
31609
31750
  async function promptConnection(existingNames) {
31610
31751
  const name = await promptInput("name", "Connection name:");
31611
31752
  if (existingNames.includes(name)) {
31612
- console.error(chalk187.red(`Connection "${name}" already exists.`));
31753
+ console.error(chalk193.red(`Connection "${name}" already exists.`));
31613
31754
  process.exit(1);
31614
31755
  }
31615
31756
  const url = await promptInput(
@@ -31618,22 +31759,22 @@ async function promptConnection(existingNames) {
31618
31759
  );
31619
31760
  const database = await promptInput("database", "Database name:");
31620
31761
  if (!name || !url || !database) {
31621
- console.error(chalk187.red("All fields are required."));
31762
+ console.error(chalk193.red("All fields are required."));
31622
31763
  process.exit(1);
31623
31764
  }
31624
31765
  const apiKeyRef = await selectOpSecret();
31625
- console.log(chalk187.dim(`Using: ${apiKeyRef}`));
31766
+ console.log(chalk193.dim(`Using: ${apiKeyRef}`));
31626
31767
  return { name, url, database, apiKeyRef };
31627
31768
  }
31628
31769
 
31629
31770
  // src/commands/ravendb/ravendbSetConnection.ts
31630
- import chalk188 from "chalk";
31771
+ import chalk194 from "chalk";
31631
31772
  function ravendbSetConnection(name) {
31632
31773
  const raw = loadGlobalConfigRaw();
31633
31774
  const ravendb = raw.ravendb ?? {};
31634
31775
  const connections = ravendb.connections ?? [];
31635
31776
  if (!connections.some((c) => c.name === name)) {
31636
- console.error(chalk188.red(`Connection "${name}" not found.`));
31777
+ console.error(chalk194.red(`Connection "${name}" not found.`));
31637
31778
  console.error(
31638
31779
  `Available: ${connections.map((c) => c.name).join(", ") || "(none)"}`
31639
31780
  );
@@ -31649,16 +31790,16 @@ function ravendbSetConnection(name) {
31649
31790
  var ravendbAuth = createConnectionAuth({
31650
31791
  load: loadConnections,
31651
31792
  save: saveConnections,
31652
- format: (c) => `${chalk189.bold(c.name)} ${c.url} db=${c.database} key=${c.apiKeyRef}`,
31793
+ format: (c) => `${chalk195.bold(c.name)} ${c.url} db=${c.database} key=${c.apiKeyRef}`,
31653
31794
  promptNew: promptConnection,
31654
31795
  onFirst: (c) => ravendbSetConnection(c.name)
31655
31796
  });
31656
31797
 
31657
31798
  // src/commands/ravendb/ravendbCollections.ts
31658
- import chalk193 from "chalk";
31799
+ import chalk199 from "chalk";
31659
31800
 
31660
31801
  // src/commands/ravendb/ravenFetch.ts
31661
- import chalk191 from "chalk";
31802
+ import chalk197 from "chalk";
31662
31803
 
31663
31804
  // src/commands/ravendb/getAccessToken.ts
31664
31805
  var OAUTH_URL = "https://amazon-useast-1-oauth.ravenhq.com/ApiKeys/OAuth/AccessToken";
@@ -31695,10 +31836,10 @@ ${errorText}`
31695
31836
 
31696
31837
  // src/commands/ravendb/resolveOpSecret.ts
31697
31838
  import { execSync as execSync47 } from "child_process";
31698
- import chalk190 from "chalk";
31839
+ import chalk196 from "chalk";
31699
31840
  function resolveOpSecret(reference) {
31700
31841
  if (!reference.startsWith("op://")) {
31701
- console.error(chalk190.red(`Invalid secret reference: must start with op://`));
31842
+ console.error(chalk196.red(`Invalid secret reference: must start with op://`));
31702
31843
  process.exit(1);
31703
31844
  }
31704
31845
  try {
@@ -31708,7 +31849,7 @@ function resolveOpSecret(reference) {
31708
31849
  }).trim();
31709
31850
  } catch {
31710
31851
  console.error(
31711
- chalk190.red(
31852
+ chalk196.red(
31712
31853
  "Failed to resolve secret reference. Ensure 1Password CLI is installed and you are signed in."
31713
31854
  )
31714
31855
  );
@@ -31735,7 +31876,7 @@ async function ravenFetch(connection, path108) {
31735
31876
  if (!response.ok) {
31736
31877
  const body = await response.text();
31737
31878
  console.error(
31738
- chalk191.red(`RavenDB error: ${response.status} ${response.statusText}`)
31879
+ chalk197.red(`RavenDB error: ${response.status} ${response.statusText}`)
31739
31880
  );
31740
31881
  console.error(body.substring(0, 500));
31741
31882
  process.exit(1);
@@ -31744,7 +31885,7 @@ async function ravenFetch(connection, path108) {
31744
31885
  }
31745
31886
 
31746
31887
  // src/commands/ravendb/resolveConnection.ts
31747
- import chalk192 from "chalk";
31888
+ import chalk198 from "chalk";
31748
31889
  function loadRavendb() {
31749
31890
  const raw = loadGlobalConfigRaw();
31750
31891
  const ravendb = raw.ravendb;
@@ -31758,7 +31899,7 @@ function resolveConnection(name) {
31758
31899
  const connectionName = name ?? defaultConnection;
31759
31900
  if (!connectionName) {
31760
31901
  console.error(
31761
- chalk192.red(
31902
+ chalk198.red(
31762
31903
  "No connection specified and no default set. Use assist ravendb set-connection <name> or pass a connection name."
31763
31904
  )
31764
31905
  );
@@ -31766,7 +31907,7 @@ function resolveConnection(name) {
31766
31907
  }
31767
31908
  const connection = connections.find((c) => c.name === connectionName);
31768
31909
  if (!connection) {
31769
- console.error(chalk192.red(`Connection "${connectionName}" not found.`));
31910
+ console.error(chalk198.red(`Connection "${connectionName}" not found.`));
31770
31911
  console.error(
31771
31912
  `Available: ${connections.map((c) => c.name).join(", ") || "(none)"}`
31772
31913
  );
@@ -31797,15 +31938,15 @@ async function ravendbCollections(connectionName) {
31797
31938
  return;
31798
31939
  }
31799
31940
  for (const c of collections) {
31800
- console.log(`${chalk193.bold(c.Name)} ${c.CountOfDocuments} docs`);
31941
+ console.log(`${chalk199.bold(c.Name)} ${c.CountOfDocuments} docs`);
31801
31942
  }
31802
31943
  }
31803
31944
 
31804
31945
  // src/commands/ravendb/ravendbQuery.ts
31805
- import chalk195 from "chalk";
31946
+ import chalk201 from "chalk";
31806
31947
 
31807
31948
  // src/commands/ravendb/fetchAllPages.ts
31808
- import chalk194 from "chalk";
31949
+ import chalk200 from "chalk";
31809
31950
 
31810
31951
  // src/commands/ravendb/buildQueryPath.ts
31811
31952
  function buildQueryPath(opts) {
@@ -31843,7 +31984,7 @@ async function fetchAllPages(connection, opts) {
31843
31984
  allResults.push(...results);
31844
31985
  start2 += results.length;
31845
31986
  process.stderr.write(
31846
- `\r${chalk194.dim(`Fetched ${allResults.length}/${totalResults}`)}`
31987
+ `\r${chalk200.dim(`Fetched ${allResults.length}/${totalResults}`)}`
31847
31988
  );
31848
31989
  if (start2 >= totalResults) break;
31849
31990
  if (opts.limit !== void 0 && allResults.length >= opts.limit) break;
@@ -31858,7 +31999,7 @@ async function fetchAllPages(connection, opts) {
31858
31999
  async function ravendbQuery(connectionName, collection, options2) {
31859
32000
  const resolved = resolveArgs(connectionName, collection);
31860
32001
  if (!resolved.collection && !options2.query) {
31861
- console.error(chalk195.red("Provide a collection name or --query filter."));
32002
+ console.error(chalk201.red("Provide a collection name or --query filter."));
31862
32003
  process.exit(1);
31863
32004
  }
31864
32005
  const { collection: col } = resolved;
@@ -31893,7 +32034,7 @@ function registerRavendb(program) {
31893
32034
  }
31894
32035
 
31895
32036
  // src/commands/releases/releasesConfigure.ts
31896
- import chalk197 from "chalk";
32037
+ import chalk203 from "chalk";
31897
32038
 
31898
32039
  // src/commands/releases/checkStreamGraph.ts
31899
32040
  function nodeIds(stream) {
@@ -31955,26 +32096,26 @@ function readStreamsInput(source) {
31955
32096
  }
31956
32097
 
31957
32098
  // src/commands/releases/reportDerivedStreams.ts
31958
- import chalk196 from "chalk";
32099
+ import chalk202 from "chalk";
31959
32100
  function printDerived(stream) {
31960
32101
  const environments = stream.nodes.flatMap((n) => n.environment ?? []);
31961
32102
  const steps = stream.nodes.filter((n) => !n.environment);
31962
32103
  console.log(
31963
- `${chalk196.bold(stream.name)} ${chalk196.dim(`${stream.repo} \xB7 ${stream.workflow}`)}`
32104
+ `${chalk202.bold(stream.name)} ${chalk202.dim(`${stream.repo} \xB7 ${stream.workflow}`)}`
31964
32105
  );
31965
32106
  console.log(
31966
- ` environments: ${environments.join(", ") || chalk196.dim("none")}`
32107
+ ` environments: ${environments.join(", ") || chalk202.dim("none")}`
31967
32108
  );
31968
32109
  if (steps.length > 0)
31969
32110
  console.log(
31970
32111
  ` steps: ${steps.map((n) => `${n.id} [${n.kind ?? "step"}]`).join(", ")}`
31971
32112
  );
31972
32113
  const edges = stream.edges.map(([from, to]) => `${from} \u2192 ${to}`);
31973
- console.log(` edges: ${edges.join(", ") || chalk196.dim("none")}`);
32114
+ console.log(` edges: ${edges.join(", ") || chalk202.dim("none")}`);
31974
32115
  }
31975
32116
  function reportDerivedStreams(streams, target) {
31976
32117
  for (const stream of streams) printDerived(stream);
31977
- console.log(chalk196.dim(`Written to ${target}`));
32118
+ console.log(chalk202.dim(`Written to ${target}`));
31978
32119
  }
31979
32120
 
31980
32121
  // src/commands/releases/withCurrentRepo.ts
@@ -32062,8 +32203,8 @@ async function writeReleaseStreams(incoming, scope) {
32062
32203
 
32063
32204
  // src/commands/releases/releasesConfigure.ts
32064
32205
  function fail6(message3, details = []) {
32065
- console.error(chalk197.red(message3));
32066
- for (const detail of details) console.error(chalk197.red(` ${detail}`));
32206
+ console.error(chalk203.red(message3));
32207
+ for (const detail of details) console.error(chalk203.red(` ${detail}`));
32067
32208
  process.exitCode = 1;
32068
32209
  }
32069
32210
  function reportWritten(incoming, target) {
@@ -32095,23 +32236,23 @@ async function releasesConfigure(options2 = {}) {
32095
32236
  }
32096
32237
 
32097
32238
  // src/commands/releases/releasesList.ts
32098
- import chalk198 from "chalk";
32239
+ import chalk204 from "chalk";
32099
32240
  function describeNode(node) {
32100
32241
  if (node.environment) return `${node.id} \u2192 ${node.environment}`;
32101
32242
  return `${node.id} (${node.kind ?? "step"})`;
32102
32243
  }
32103
32244
  function printStream(stream) {
32104
- console.log(`${chalk198.bold(stream.name)} ${chalk198.dim(stream.repo)}`);
32105
- console.log(chalk198.dim(` workflow: ${stream.workflow}`));
32245
+ console.log(`${chalk204.bold(stream.name)} ${chalk204.dim(stream.repo)}`);
32246
+ console.log(chalk204.dim(` workflow: ${stream.workflow}`));
32106
32247
  for (const node of stream.nodes) console.log(` ${describeNode(node)}`);
32107
32248
  for (const [from, to] of stream.edges)
32108
- console.log(chalk198.dim(` ${from} \u2192 ${to}`));
32249
+ console.log(chalk204.dim(` ${from} \u2192 ${to}`));
32109
32250
  }
32110
32251
  function releasesList() {
32111
32252
  const streams = loadConfig().releases?.streams ?? [];
32112
32253
  if (streams.length === 0) {
32113
32254
  console.log(
32114
- chalk198.dim("No release streams configured under releases.streams.")
32255
+ chalk204.dim("No release streams configured under releases.streams.")
32115
32256
  );
32116
32257
  return;
32117
32258
  }
@@ -32127,16 +32268,19 @@ function registerReleases(parent) {
32127
32268
  "Streams are declared by '/releases-configure', which derives them from the repo's workflows and writes them with 'assist releases configure', and rendered by the /releases page of the sessions dashboard."
32128
32269
  );
32129
32270
  releasesCommand.command("list").description("List the declared release streams, their nodes and edges").action(releasesList);
32130
- releasesCommand.command("configure").description(
32131
- "Validate release streams and write them to releases.streams for the current repo"
32132
- ).requiredOption(
32133
- "--streams <file>",
32134
- "JSON or YAML array of streams to declare; '-' reads stdin"
32135
- ).option(
32136
- "--scope <project|repo>",
32137
- "project assist.yml or this repo's shared db override",
32138
- "project"
32139
- ).action(releasesConfigure);
32271
+ internalCommand(
32272
+ releasesCommand.command("configure").description(
32273
+ "Validate release streams and write them to releases.streams for the current repo"
32274
+ ).requiredOption(
32275
+ "--streams <file>",
32276
+ "JSON or YAML array of streams to declare; '-' reads stdin"
32277
+ ).option(
32278
+ "--scope <project|repo>",
32279
+ "project assist.yml or this repo's shared db override",
32280
+ "project"
32281
+ ).action(releasesConfigure),
32282
+ "/releases-configure"
32283
+ );
32140
32284
  }
32141
32285
 
32142
32286
  // src/commands/coverage.ts
@@ -32156,7 +32300,7 @@ function coverage() {
32156
32300
 
32157
32301
  // src/commands/lint/lint/runFileNameCheck.ts
32158
32302
  import path45 from "path";
32159
- import chalk200 from "chalk";
32303
+ import chalk206 from "chalk";
32160
32304
 
32161
32305
  // src/commands/lint/lint/checkFileNames.ts
32162
32306
  import fs23 from "fs";
@@ -32236,7 +32380,7 @@ function checkFileNames() {
32236
32380
  }
32237
32381
 
32238
32382
  // src/commands/lint/lint/fixFileNameViolations.ts
32239
- import chalk199 from "chalk";
32383
+ import chalk205 from "chalk";
32240
32384
 
32241
32385
  // src/commands/lint/lint/applyMoves.ts
32242
32386
  import fs24 from "fs";
@@ -32321,25 +32465,25 @@ function fixFileNameViolations(moves) {
32321
32465
  const start2 = performance.now();
32322
32466
  const project = createLintProject();
32323
32467
  const cwd = process.cwd();
32324
- applyMoves(project, moves, cwd, (line) => console.log(chalk199.green(line)));
32468
+ applyMoves(project, moves, cwd, (line) => console.log(chalk205.green(line)));
32325
32469
  const ms = (performance.now() - start2).toFixed(0);
32326
- console.log(chalk199.dim(` Done in ${ms}ms`));
32470
+ console.log(chalk205.dim(` Done in ${ms}ms`));
32327
32471
  }
32328
32472
 
32329
32473
  // src/commands/lint/lint/runFileNameCheck.ts
32330
32474
  function reportViolations(violations) {
32331
- console.error(chalk200.red("\nFile name check failed:\n"));
32475
+ console.error(chalk206.red("\nFile name check failed:\n"));
32332
32476
  console.error(
32333
- chalk200.red(
32477
+ chalk206.red(
32334
32478
  " Files without classes or React components should not start with a capital letter.\n"
32335
32479
  )
32336
32480
  );
32337
32481
  for (const violation of violations) {
32338
- console.error(chalk200.red(` ${violation.filePath}`));
32339
- console.error(chalk200.gray(` Rename to: ${violation.suggestedName}
32482
+ console.error(chalk206.red(` ${violation.filePath}`));
32483
+ console.error(chalk206.gray(` Rename to: ${violation.suggestedName}
32340
32484
  `));
32341
32485
  }
32342
- console.error(chalk200.dim(" Run with -f to auto-fix.\n"));
32486
+ console.error(chalk206.dim(" Run with -f to auto-fix.\n"));
32343
32487
  }
32344
32488
  function runFileNameCheck(fix = false) {
32345
32489
  const violations = checkFileNames();
@@ -32368,17 +32512,17 @@ function runFileNameCheck(fix = false) {
32368
32512
  import fs26 from "fs";
32369
32513
 
32370
32514
  // src/commands/lint/shared.ts
32371
- import chalk201 from "chalk";
32515
+ import chalk207 from "chalk";
32372
32516
  function reportViolations2(violations, checkName2, errorMessage3, successMessage) {
32373
32517
  if (violations.length > 0) {
32374
- console.error(chalk201.red(`
32518
+ console.error(chalk207.red(`
32375
32519
  ${checkName2} failed:
32376
32520
  `));
32377
- console.error(chalk201.red(` ${errorMessage3}
32521
+ console.error(chalk207.red(` ${errorMessage3}
32378
32522
  `));
32379
32523
  for (const violation of violations) {
32380
- console.error(chalk201.red(` ${violation.filePath}:${violation.line}`));
32381
- console.error(chalk201.gray(` ${violation.content}
32524
+ console.error(chalk207.red(` ${violation.filePath}:${violation.line}`));
32525
+ console.error(chalk207.gray(` ${violation.content}
32382
32526
  `));
32383
32527
  }
32384
32528
  return false;
@@ -32509,7 +32653,7 @@ import { execSync as execSync49 } from "child_process";
32509
32653
  import { existsSync as existsSync65, mkdirSync as mkdirSync23, unlinkSync as unlinkSync15, writeFileSync as writeFileSync37 } from "fs";
32510
32654
  import { tmpdir as tmpdir6 } from "os";
32511
32655
  import { join as join80, resolve as resolve24 } from "path";
32512
- import chalk202 from "chalk";
32656
+ import chalk208 from "chalk";
32513
32657
 
32514
32658
  // src/commands/screenshot/captureWindowPs1.ts
32515
32659
  var captureWindowPs1 = `
@@ -32660,19 +32804,19 @@ function screenshot(processName) {
32660
32804
  const config = loadConfig();
32661
32805
  const outputDir = resolve24(config.screenshot.outputDir);
32662
32806
  const outputPath = buildOutputPath(outputDir, processName);
32663
- console.log(chalk202.gray(`Capturing window for process "${processName}" ...`));
32807
+ console.log(chalk208.gray(`Capturing window for process "${processName}" ...`));
32664
32808
  try {
32665
32809
  runPowerShellScript(processName, outputPath);
32666
- console.log(chalk202.green(`Screenshot saved: ${outputPath}`));
32810
+ console.log(chalk208.green(`Screenshot saved: ${outputPath}`));
32667
32811
  } catch (error) {
32668
32812
  const msg = error instanceof Error ? error.message : String(error);
32669
- console.error(chalk202.red(`Failed to capture screenshot: ${msg}`));
32813
+ console.error(chalk208.red(`Failed to capture screenshot: ${msg}`));
32670
32814
  process.exit(1);
32671
32815
  }
32672
32816
  }
32673
32817
 
32674
32818
  // src/commands/statusLine.ts
32675
- import chalk204 from "chalk";
32819
+ import chalk210 from "chalk";
32676
32820
 
32677
32821
  // src/shared/contextLevel.ts
32678
32822
  var THRESHOLDS = {
@@ -32688,7 +32832,7 @@ function contextLevel(pct, harness) {
32688
32832
  }
32689
32833
 
32690
32834
  // src/commands/buildLimitsSegment.ts
32691
- import chalk203 from "chalk";
32835
+ import chalk209 from "chalk";
32692
32836
 
32693
32837
  // src/shared/rateLimitLevel.ts
32694
32838
  var FIVE_HOUR_SECONDS = 5 * 3600;
@@ -32726,9 +32870,9 @@ function rateLimitLevel(pct, resetsAt, windowSeconds, now) {
32726
32870
 
32727
32871
  // src/commands/buildLimitsSegment.ts
32728
32872
  var LEVEL_COLOR = {
32729
- ok: chalk203.green,
32730
- warn: chalk203.yellow,
32731
- over: chalk203.red
32873
+ ok: chalk209.green,
32874
+ warn: chalk209.yellow,
32875
+ over: chalk209.red
32732
32876
  };
32733
32877
  function formatLimit(pct, resetsAt, windowSeconds, fallbackLabel, now) {
32734
32878
  const level = rateLimitLevel(pct, resetsAt, windowSeconds, now);
@@ -32824,7 +32968,7 @@ async function relayUsage(claudeSessionId, transcriptPath2, usedPct) {
32824
32968
  }
32825
32969
 
32826
32970
  // src/commands/statusLine.ts
32827
- chalk204.level = 3;
32971
+ chalk210.level = 3;
32828
32972
  function formatNumber(num) {
32829
32973
  return num.toLocaleString("en-US");
32830
32974
  }
@@ -32832,9 +32976,9 @@ function colorizePercent(pct) {
32832
32976
  const label2 = `${Math.round(pct)}%`;
32833
32977
  switch (contextLevel(pct)) {
32834
32978
  case "red":
32835
- return chalk204.red(label2);
32979
+ return chalk210.red(label2);
32836
32980
  case "yellow":
32837
- return chalk204.yellow(label2);
32981
+ return chalk210.yellow(label2);
32838
32982
  default:
32839
32983
  return label2;
32840
32984
  }
@@ -32847,7 +32991,7 @@ async function statusLine() {
32847
32991
  const usedPct = data.context_window.used_percentage ?? 0;
32848
32992
  const dir = data.workspace?.current_dir ?? data.cwd;
32849
32993
  const branch2 = dir ? readGitBranch(dir) : null;
32850
- const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk204.cyan(branch2)} | ` : "";
32994
+ const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk210.cyan(branch2)} | ` : "";
32851
32995
  console.log(
32852
32996
  `${branchSegment}${model} | Tokens - ${formatNumber(totalIn)} \u2191 : ${formatNumber(totalOut)} \u2193 | Context - ${colorizePercent(usedPct)}${buildLimitsSegment(data.rate_limits)}`
32853
32997
  );
@@ -32950,7 +33094,7 @@ import { spawn as spawn7 } from "child_process";
32950
33094
  import * as path47 from "path";
32951
33095
 
32952
33096
  // src/commands/refactor/logViolations.ts
32953
- import chalk205 from "chalk";
33097
+ import chalk211 from "chalk";
32954
33098
  var DEFAULT_MAX_LINES2 = 100;
32955
33099
  function logViolations(violations, maxLines = DEFAULT_MAX_LINES2) {
32956
33100
  if (violations.length === 0) {
@@ -32959,43 +33103,43 @@ function logViolations(violations, maxLines = DEFAULT_MAX_LINES2) {
32959
33103
  }
32960
33104
  return;
32961
33105
  }
32962
- console.error(chalk205.red(`
33106
+ console.error(chalk211.red(`
32963
33107
  Refactor check failed:
32964
33108
  `));
32965
- console.error(chalk205.red(` The following files exceed ${maxLines} lines:
33109
+ console.error(chalk211.red(` The following files exceed ${maxLines} lines:
32966
33110
  `));
32967
33111
  for (const violation of violations) {
32968
- console.error(chalk205.red(` ${violation.file} (${violation.lines} lines)`));
33112
+ console.error(chalk211.red(` ${violation.file} (${violation.lines} lines)`));
32969
33113
  }
32970
33114
  console.error(
32971
- chalk205.yellow(
33115
+ chalk211.yellow(
32972
33116
  `
32973
33117
  Each file needs to be sensibly refactored, or if there is no sensible
32974
33118
  way to refactor it, ignore it with:
32975
33119
  `
32976
33120
  )
32977
33121
  );
32978
- console.error(chalk205.gray(` assist refactor ignore <file>
33122
+ console.error(chalk211.gray(` assist refactor ignore <file>
32979
33123
  `));
32980
33124
  if (process.env.CLAUDECODE) {
32981
- console.error(chalk205.cyan(`
33125
+ console.error(chalk211.cyan(`
32982
33126
  ## Extracting Code to New Files
32983
33127
  `));
32984
33128
  console.error(
32985
- chalk205.cyan(
33129
+ chalk211.cyan(
32986
33130
  ` When extracting logic from one file to another, consider where the extracted code belongs:
32987
33131
  `
32988
33132
  )
32989
33133
  );
32990
33134
  console.error(
32991
- chalk205.cyan(
33135
+ chalk211.cyan(
32992
33136
  ` 1. Keep related logic together: If the extracted code is tightly coupled to the
32993
33137
  original file's domain, create a new folder containing both the original and extracted files.
32994
33138
  `
32995
33139
  )
32996
33140
  );
32997
33141
  console.error(
32998
- chalk205.cyan(
33142
+ chalk211.cyan(
32999
33143
  ` 2. Share common utilities: If the extracted code can be reused across multiple
33000
33144
  domains, move it to a common/shared folder.
33001
33145
  `
@@ -33151,7 +33295,7 @@ async function check(pattern2, options2) {
33151
33295
 
33152
33296
  // src/commands/refactor/extract.ts
33153
33297
  import path55 from "path";
33154
- import chalk208 from "chalk";
33298
+ import chalk214 from "chalk";
33155
33299
 
33156
33300
  // src/commands/refactor/extract/applyExtraction.ts
33157
33301
  import { SyntaxKind as SyntaxKind4 } from "ts-morph";
@@ -33759,23 +33903,23 @@ function buildPlan2(functionName, sourceFile, sourcePath, destPath, project) {
33759
33903
 
33760
33904
  // src/commands/refactor/extract/displayPlan.ts
33761
33905
  import path51 from "path";
33762
- import chalk206 from "chalk";
33906
+ import chalk212 from "chalk";
33763
33907
  function section(title) {
33764
33908
  return `
33765
- ${chalk206.cyan(title)}`;
33909
+ ${chalk212.cyan(title)}`;
33766
33910
  }
33767
33911
  function displayImporters(plan2, cwd) {
33768
33912
  if (plan2.importersToUpdate.length === 0) return;
33769
33913
  console.log(section("Update importers:"));
33770
33914
  for (const imp of plan2.importersToUpdate) {
33771
33915
  const rel = path51.relative(cwd, imp.file.getFilePath());
33772
- console.log(` ${chalk206.dim(rel)}: \u2192 import from "${imp.relPath}"`);
33916
+ console.log(` ${chalk212.dim(rel)}: \u2192 import from "${imp.relPath}"`);
33773
33917
  }
33774
33918
  }
33775
33919
  function displayPlan(functionName, relDest, plan2, cwd) {
33776
- console.log(chalk206.bold(`Extract: ${functionName} \u2192 ${relDest}
33920
+ console.log(chalk212.bold(`Extract: ${functionName} \u2192 ${relDest}
33777
33921
  `));
33778
- console.log(` ${chalk206.cyan("Functions to move:")}`);
33922
+ console.log(` ${chalk212.cyan("Functions to move:")}`);
33779
33923
  for (const name of plan2.extractedNames) {
33780
33924
  console.log(` ${name}`);
33781
33925
  }
@@ -33809,7 +33953,7 @@ function displayPlan(functionName, relDest, plan2, cwd) {
33809
33953
 
33810
33954
  // src/commands/refactor/extract/loadProjectFile.ts
33811
33955
  import path54 from "path";
33812
- import chalk207 from "chalk";
33956
+ import chalk213 from "chalk";
33813
33957
  import { Project as Project3 } from "ts-morph";
33814
33958
 
33815
33959
  // src/commands/refactor/extract/findTsConfig.ts
@@ -33901,7 +34045,7 @@ function loadProjectFile(file) {
33901
34045
  });
33902
34046
  const sourceFile = project.getSourceFile(sourcePath);
33903
34047
  if (!sourceFile) {
33904
- console.log(chalk207.red(`File not found in project: ${file}`));
34048
+ console.log(chalk213.red(`File not found in project: ${file}`));
33905
34049
  process.exit(1);
33906
34050
  }
33907
34051
  return { project, sourceFile };
@@ -33924,19 +34068,19 @@ async function extract(file, functionName, destination, options2 = {}) {
33924
34068
  displayPlan(functionName, relDest, plan2, cwd);
33925
34069
  if (options2.apply) {
33926
34070
  await applyExtraction(functionName, sourceFile, destPath, plan2, project);
33927
- console.log(chalk208.green("\nExtraction complete"));
34071
+ console.log(chalk214.green("\nExtraction complete"));
33928
34072
  } else {
33929
- console.log(chalk208.dim("\nDry run. Use --apply to execute."));
34073
+ console.log(chalk214.dim("\nDry run. Use --apply to execute."));
33930
34074
  }
33931
34075
  }
33932
34076
 
33933
34077
  // src/commands/refactor/ignore.ts
33934
34078
  import fs32 from "fs";
33935
- import chalk209 from "chalk";
34079
+ import chalk215 from "chalk";
33936
34080
  var REFACTOR_YML_PATH2 = "refactor.yml";
33937
34081
  function ignore2(file) {
33938
34082
  if (!fs32.existsSync(file)) {
33939
- console.error(chalk209.red(`Error: File does not exist: ${file}`));
34083
+ console.error(chalk215.red(`Error: File does not exist: ${file}`));
33940
34084
  process.exit(1);
33941
34085
  }
33942
34086
  const content = fs32.readFileSync(file, "utf8");
@@ -33952,7 +34096,7 @@ function ignore2(file) {
33952
34096
  fs32.writeFileSync(REFACTOR_YML_PATH2, entry);
33953
34097
  }
33954
34098
  console.log(
33955
- chalk209.green(
34099
+ chalk215.green(
33956
34100
  `Added ${file} to refactor ignore list (max ${maxLines} lines)`
33957
34101
  )
33958
34102
  );
@@ -33961,12 +34105,12 @@ function ignore2(file) {
33961
34105
  // src/commands/refactor/rename.ts
33962
34106
  import fs35 from "fs";
33963
34107
  import path61 from "path";
33964
- import chalk212 from "chalk";
34108
+ import chalk218 from "chalk";
33965
34109
 
33966
34110
  // src/commands/refactor/rename/applyRename.ts
33967
34111
  import fs34 from "fs";
33968
34112
  import path57 from "path";
33969
- import chalk210 from "chalk";
34113
+ import chalk216 from "chalk";
33970
34114
 
33971
34115
  // src/commands/refactor/restructure/computeRewrites.ts
33972
34116
  import path56 from "path";
@@ -33974,9 +34118,9 @@ import path56 from "path";
33974
34118
  // src/commands/refactor/restructure/computeRewrites/applyRewrites.ts
33975
34119
  import fs33 from "fs";
33976
34120
  function getOrCreateList(map, key) {
33977
- const list5 = map.get(key) ?? [];
33978
- if (!map.has(key)) map.set(key, list5);
33979
- return list5;
34121
+ const list6 = map.get(key) ?? [];
34122
+ if (!map.has(key)) map.set(key, list6);
34123
+ return list6;
33980
34124
  }
33981
34125
  function groupByFile2(rewrites) {
33982
34126
  const grouped = /* @__PURE__ */ new Map();
@@ -34072,13 +34216,13 @@ function applyRename(rewrites, sourcePath, destPath, cwd) {
34072
34216
  const updatedContents = applyRewrites(rewrites);
34073
34217
  for (const [file, content] of updatedContents) {
34074
34218
  fs34.writeFileSync(file, content, "utf8");
34075
- console.log(chalk210.cyan(` Updated imports in ${path57.relative(cwd, file)}`));
34219
+ console.log(chalk216.cyan(` Updated imports in ${path57.relative(cwd, file)}`));
34076
34220
  }
34077
34221
  const destDir = path57.dirname(destPath);
34078
34222
  if (!fs34.existsSync(destDir)) fs34.mkdirSync(destDir, { recursive: true });
34079
34223
  fs34.renameSync(sourcePath, destPath);
34080
34224
  console.log(
34081
- chalk210.white(
34225
+ chalk216.white(
34082
34226
  ` Moved ${path57.relative(cwd, sourcePath)} \u2192 ${path57.relative(cwd, destPath)}`
34083
34227
  )
34084
34228
  );
@@ -34228,16 +34372,16 @@ function computeRenameRewrites(sourcePath, destPath) {
34228
34372
 
34229
34373
  // src/commands/refactor/rename/printRenamePreview.ts
34230
34374
  import path60 from "path";
34231
- import chalk211 from "chalk";
34375
+ import chalk217 from "chalk";
34232
34376
  function printRenamePreview(rewrites, cwd) {
34233
34377
  for (const rewrite of rewrites) {
34234
34378
  console.log(
34235
- chalk211.dim(
34379
+ chalk217.dim(
34236
34380
  ` ${path60.relative(cwd, rewrite.file)}: ${rewrite.oldSpecifier} \u2192 ${rewrite.newSpecifier}`
34237
34381
  )
34238
34382
  );
34239
34383
  }
34240
- console.log(chalk211.dim("Dry run. Use --apply to execute."));
34384
+ console.log(chalk217.dim("Dry run. Use --apply to execute."));
34241
34385
  }
34242
34386
 
34243
34387
  // src/commands/refactor/rename.ts
@@ -34248,20 +34392,20 @@ async function rename(source, destination, options2 = {}) {
34248
34392
  const relSource = path61.relative(cwd, sourcePath);
34249
34393
  const relDest = path61.relative(cwd, destPath);
34250
34394
  if (!fs35.existsSync(sourcePath)) {
34251
- console.log(chalk212.red(`File not found: ${source}`));
34395
+ console.log(chalk218.red(`File not found: ${source}`));
34252
34396
  process.exit(1);
34253
34397
  }
34254
34398
  if (destPath !== sourcePath && fs35.existsSync(destPath)) {
34255
- console.log(chalk212.red(`Destination already exists: ${destination}`));
34399
+ console.log(chalk218.red(`Destination already exists: ${destination}`));
34256
34400
  process.exit(1);
34257
34401
  }
34258
- console.log(chalk212.bold(`Rename: ${relSource} \u2192 ${relDest}`));
34259
- console.log(chalk212.dim("Loading project..."));
34260
- console.log(chalk212.dim("Scanning imports across the project..."));
34402
+ console.log(chalk218.bold(`Rename: ${relSource} \u2192 ${relDest}`));
34403
+ console.log(chalk218.dim("Loading project..."));
34404
+ console.log(chalk218.dim("Scanning imports across the project..."));
34261
34405
  const rewrites = computeRenameRewrites(sourcePath, destPath);
34262
34406
  const affectedFiles = new Set(rewrites.map((r) => r.file)).size;
34263
34407
  console.log(
34264
- chalk212.dim(
34408
+ chalk218.dim(
34265
34409
  `${rewrites.length} import path(s) to update across ${affectedFiles} file(s)`
34266
34410
  )
34267
34411
  );
@@ -34270,11 +34414,11 @@ async function rename(source, destination, options2 = {}) {
34270
34414
  return;
34271
34415
  }
34272
34416
  applyRename(rewrites, sourcePath, destPath, cwd);
34273
- console.log(chalk212.green("Done"));
34417
+ console.log(chalk218.green("Done"));
34274
34418
  }
34275
34419
 
34276
34420
  // src/commands/refactor/renameSymbol.ts
34277
- import chalk213 from "chalk";
34421
+ import chalk219 from "chalk";
34278
34422
 
34279
34423
  // src/commands/refactor/renameSymbol/findSymbol.ts
34280
34424
  import { SyntaxKind as SyntaxKind15 } from "ts-morph";
@@ -34320,34 +34464,34 @@ async function renameSymbol(file, oldName, newName, options2 = {}) {
34320
34464
  const { project, sourceFile } = loadProjectFile(file);
34321
34465
  const symbol = findSymbol(sourceFile, oldName);
34322
34466
  if (!symbol) {
34323
- console.log(chalk213.red(`Symbol "${oldName}" not found in ${file}`));
34467
+ console.log(chalk219.red(`Symbol "${oldName}" not found in ${file}`));
34324
34468
  process.exit(1);
34325
34469
  }
34326
34470
  const grouped = groupReferences(symbol, cwd);
34327
34471
  const totalRefs = [...grouped.values()].reduce((s, l) => s + l.length, 0);
34328
34472
  console.log(
34329
- chalk213.bold(`Rename: ${oldName} \u2192 ${newName} (${totalRefs} references)
34473
+ chalk219.bold(`Rename: ${oldName} \u2192 ${newName} (${totalRefs} references)
34330
34474
  `)
34331
34475
  );
34332
34476
  for (const [refFile, lines2] of grouped) {
34333
34477
  console.log(
34334
- ` ${chalk213.dim(refFile)}: lines ${chalk213.cyan(lines2.join(", "))}`
34478
+ ` ${chalk219.dim(refFile)}: lines ${chalk219.cyan(lines2.join(", "))}`
34335
34479
  );
34336
34480
  }
34337
34481
  if (options2.apply) {
34338
34482
  symbol.rename(newName);
34339
34483
  await project.save();
34340
- console.log(chalk213.green(`
34484
+ console.log(chalk219.green(`
34341
34485
  Renamed ${oldName} \u2192 ${newName}`));
34342
34486
  } else {
34343
- console.log(chalk213.dim("\nDry run. Use --apply to execute."));
34487
+ console.log(chalk219.dim("\nDry run. Use --apply to execute."));
34344
34488
  }
34345
34489
  }
34346
34490
 
34347
34491
  // src/commands/refactor/restructure.ts
34348
34492
  import fs37 from "fs";
34349
34493
  import path82 from "path";
34350
- import chalk223 from "chalk";
34494
+ import chalk229 from "chalk";
34351
34495
 
34352
34496
  // src/commands/refactor/restructure/buildPlan.ts
34353
34497
  import path72 from "path";
@@ -34684,7 +34828,7 @@ function buildPlan3(scopeRoot, files, ignored = [], pinnedModules = []) {
34684
34828
  }
34685
34829
 
34686
34830
  // src/commands/refactor/restructure/checkPlan.ts
34687
- import chalk218 from "chalk";
34831
+ import chalk224 from "chalk";
34688
34832
 
34689
34833
  // src/commands/refactor/restructure/applyCommand.ts
34690
34834
  import path73 from "path";
@@ -34695,13 +34839,13 @@ function applyCommand(scopeRoot) {
34695
34839
 
34696
34840
  // src/commands/refactor/restructure/displayDrift.ts
34697
34841
  import path74 from "path";
34698
- import chalk214 from "chalk";
34842
+ import chalk220 from "chalk";
34699
34843
  var shownMoves = 20;
34700
34844
  function displayDrift(plan2, listMoves) {
34701
34845
  const rel = (file) => path74.relative(process.cwd(), file);
34702
34846
  if (plan2.moves.length > 0) {
34703
34847
  console.log(
34704
- chalk214.red(
34848
+ chalk220.red(
34705
34849
  `${plan2.moves.length} file(s) drift from the plan${listMoves ? ":" : "."}`
34706
34850
  )
34707
34851
  );
@@ -34709,17 +34853,17 @@ function displayDrift(plan2, listMoves) {
34709
34853
  for (const move2 of plan2.moves.slice(0, shownMoves))
34710
34854
  console.log(` ${rel(move2.from)} \u2192 ${rel(move2.to)}`);
34711
34855
  if (plan2.moves.length > shownMoves)
34712
- console.log(chalk214.dim(` \u2026and ${plan2.moves.length - shownMoves} more`));
34856
+ console.log(chalk220.dim(` \u2026and ${plan2.moves.length - shownMoves} more`));
34713
34857
  }
34714
34858
  }
34715
- for (const error of plan2.errors) console.log(chalk214.red(error));
34859
+ for (const error of plan2.errors) console.log(chalk220.red(error));
34716
34860
  }
34717
34861
 
34718
34862
  // src/commands/refactor/restructure/displayLayoutLimits.ts
34719
- import chalk217 from "chalk";
34863
+ import chalk223 from "chalk";
34720
34864
 
34721
34865
  // src/commands/refactor/restructure/displayDeepChains.ts
34722
- import chalk215 from "chalk";
34866
+ import chalk221 from "chalk";
34723
34867
  var shownChains = 10;
34724
34868
  function formatChain(chain2) {
34725
34869
  const folders = chain2.folders.map((f) => `${f.name} (${f.files})`).join(" > ");
@@ -34729,28 +34873,28 @@ function displayDeepChains(chains, maxDepth) {
34729
34873
  if (chains.length === 0) return;
34730
34874
  const tooDeep = chains.reduce((sum3, c) => sum3 + c.tooDeep, 0);
34731
34875
  console.log(
34732
- chalk215.red(
34876
+ chalk221.red(
34733
34877
  `
34734
34878
  Plan exceeds restructure.maxDepth ${maxDepth}: ${tooDeep} file(s) deeper.`
34735
34879
  )
34736
34880
  );
34737
34881
  console.log(
34738
- chalk215.bold(
34882
+ chalk221.bold(
34739
34883
  "Deep chains, as folder (files beneath), most files too deep first:"
34740
34884
  )
34741
34885
  );
34742
34886
  for (const chain2 of chains.slice(0, shownChains))
34743
34887
  console.log(formatChain(chain2));
34744
34888
  if (chains.length > shownChains)
34745
- console.log(chalk215.dim(` \u2026and ${chains.length - shownChains} more`));
34889
+ console.log(chalk221.dim(` \u2026and ${chains.length - shownChains} more`));
34746
34890
  }
34747
34891
 
34748
34892
  // src/commands/refactor/restructure/displayLongPaths.ts
34749
- import chalk216 from "chalk";
34893
+ import chalk222 from "chalk";
34750
34894
  function displayLongPaths(longPaths, maxPathLength) {
34751
34895
  if (longPaths.length === 0) return;
34752
34896
  console.log(
34753
- chalk216.red(
34897
+ chalk222.red(
34754
34898
  `
34755
34899
  Plan exceeds restructure.maxPathLength ${maxPathLength}: ${longPaths.length} repo-relative path(s) longer.`
34756
34900
  )
@@ -34778,7 +34922,7 @@ function displayLayoutLimits(limits, apply) {
34778
34922
  displayDeepChains(limits.chains, limits.maxDepth);
34779
34923
  displayLongPaths(limits.longPaths, limits.maxPathLength);
34780
34924
  console.log("");
34781
- for (const line of pinSteps(apply)) console.log(chalk217.yellow(line));
34925
+ for (const line of pinSteps(apply)) console.log(chalk223.yellow(line));
34782
34926
  }
34783
34927
 
34784
34928
  // src/commands/refactor/restructure/checkPlan.ts
@@ -34790,14 +34934,14 @@ function checkPlan(plan2, limits) {
34790
34934
  if (exceeds || plan2.errors.length > 0) process.exit(1);
34791
34935
  if (plan2.moves.length > 0) {
34792
34936
  console.log(
34793
- chalk218.yellow(
34937
+ chalk224.yellow(
34794
34938
  `
34795
34939
  Run \`${apply}\` to move the files and rewrite their imports.`
34796
34940
  )
34797
34941
  );
34798
34942
  process.exit(1);
34799
34943
  }
34800
- console.log(chalk218.green("Layout matches the restructure plan"));
34944
+ console.log(chalk224.green("Layout matches the restructure plan"));
34801
34945
  }
34802
34946
 
34803
34947
  // src/commands/refactor/restructure/findDeepChains.ts
@@ -34867,15 +35011,15 @@ function partitionIgnored(files) {
34867
35011
  }
34868
35012
 
34869
35013
  // src/commands/refactor/restructure/runPlan.ts
34870
- import chalk222 from "chalk";
35014
+ import chalk228 from "chalk";
34871
35015
 
34872
35016
  // src/commands/refactor/restructure/applyPlan.ts
34873
- import chalk220 from "chalk";
35017
+ import chalk226 from "chalk";
34874
35018
 
34875
35019
  // src/commands/refactor/restructure/executePlan.ts
34876
35020
  import fs36 from "fs";
34877
35021
  import path78 from "path";
34878
- import chalk219 from "chalk";
35022
+ import chalk225 from "chalk";
34879
35023
  function relPath(file) {
34880
35024
  return path78.relative(process.cwd(), file);
34881
35025
  }
@@ -34892,14 +35036,14 @@ function moveFiles(moves) {
34892
35036
  fs36.mkdirSync(path78.dirname(move2.to), { recursive: true });
34893
35037
  fs36.renameSync(staging, move2.to);
34894
35038
  console.log(
34895
- chalk219.white(` Moved ${relPath(move2.from)} \u2192 ${relPath(move2.to)}`)
35039
+ chalk225.white(` Moved ${relPath(move2.from)} \u2192 ${relPath(move2.to)}`)
34896
35040
  );
34897
35041
  }
34898
35042
  }
34899
35043
  function removeIfEmpty(dir) {
34900
35044
  if (!fs36.existsSync(dir) || fs36.readdirSync(dir).length > 0) return false;
34901
35045
  fs36.rmdirSync(dir);
34902
- console.log(chalk219.dim(` Removed empty directory ${relPath(dir)}`));
35046
+ console.log(chalk225.dim(` Removed empty directory ${relPath(dir)}`));
34903
35047
  return true;
34904
35048
  }
34905
35049
  function removeEmptyDirectories(dirs, scopeRoot) {
@@ -34912,7 +35056,7 @@ function removeEmptyDirectories(dirs, scopeRoot) {
34912
35056
  function executePlan(plan2) {
34913
35057
  for (const [file, content] of applyRewrites(plan2.rewrites)) {
34914
35058
  fs36.writeFileSync(file, content, "utf8");
34915
- console.log(chalk219.cyan(` Rewrote imports in ${relPath(file)}`));
35059
+ console.log(chalk225.cyan(` Rewrote imports in ${relPath(file)}`));
34916
35060
  }
34917
35061
  moveFiles(plan2.moves);
34918
35062
  removeEmptyDirectories(
@@ -34924,17 +35068,17 @@ function executePlan(plan2) {
34924
35068
  // src/commands/refactor/restructure/applyPlan.ts
34925
35069
  function applyPlan(plan2) {
34926
35070
  if (plan2.errors.length > 0) {
34927
- console.log(chalk220.red("\nResolve the errors above before applying."));
35071
+ console.log(chalk226.red("\nResolve the errors above before applying."));
34928
35072
  process.exit(1);
34929
35073
  }
34930
- console.log(chalk220.bold("\nApplying changes..."));
35074
+ console.log(chalk226.bold("\nApplying changes..."));
34931
35075
  executePlan(plan2);
34932
- console.log(chalk220.green("\nRestructuring complete"));
35076
+ console.log(chalk226.green("\nRestructuring complete"));
34933
35077
  }
34934
35078
 
34935
35079
  // src/commands/refactor/restructure/displayPlan.ts
34936
35080
  import path81 from "path";
34937
- import chalk221 from "chalk";
35081
+ import chalk227 from "chalk";
34938
35082
 
34939
35083
  // src/commands/refactor/restructure/computeDepthStats.ts
34940
35084
  import path79 from "path";
@@ -34985,17 +35129,17 @@ function relPath2(filePath) {
34985
35129
  }
34986
35130
  function displayMoves(plan2) {
34987
35131
  if (plan2.moves.length === 0) return;
34988
- console.log(chalk221.bold("\nFile moves:"));
35132
+ console.log(chalk227.bold("\nFile moves:"));
34989
35133
  for (const move2 of plan2.moves) {
34990
35134
  console.log(
34991
- ` ${chalk221.red(relPath2(move2.from))} \u2192 ${chalk221.green(relPath2(move2.to))}`
35135
+ ` ${chalk227.red(relPath2(move2.from))} \u2192 ${chalk227.green(relPath2(move2.to))}`
34992
35136
  );
34993
- console.log(chalk221.dim(` ${move2.reason}`));
35137
+ console.log(chalk227.dim(` ${move2.reason}`));
34994
35138
  }
34995
35139
  }
34996
35140
  function displayTree(plan2) {
34997
35141
  console.log(
34998
- chalk221.bold(`
35142
+ chalk227.bold(`
34999
35143
  Resulting tree (${relPath2(plan2.scopeRoot) || "."}/):`)
35000
35144
  );
35001
35145
  for (const line of formatTree(plan2.targets.values(), plan2.scopeRoot))
@@ -35006,15 +35150,15 @@ function displayDepthStats(plan2) {
35006
35150
  plan2.targets.values(),
35007
35151
  plan2.scopeRoot
35008
35152
  );
35009
- console.log(chalk221.bold(`
35153
+ console.log(chalk227.bold(`
35010
35154
  Depth (max ${max}):`));
35011
35155
  for (const depth of [...distribution.keys()].sort((a, b) => a - b))
35012
35156
  console.log(` ${depth}: ${distribution.get(depth)} file(s)`);
35013
35157
  }
35014
35158
  function displayErrors(errors) {
35015
35159
  if (errors.length === 0) return;
35016
- console.log(chalk221.red("\nErrors:"));
35017
- for (const error of errors) console.log(chalk221.red(` ${error}`));
35160
+ console.log(chalk227.red("\nErrors:"));
35161
+ for (const error of errors) console.log(chalk227.red(` ${error}`));
35018
35162
  }
35019
35163
  function displayPlan2(plan2) {
35020
35164
  displayMoves(plan2);
@@ -35023,7 +35167,7 @@ function displayPlan2(plan2) {
35023
35167
  displayErrors(plan2.errors);
35024
35168
  const rewrittenFiles = new Set(plan2.rewrites.map((r) => r.file)).size;
35025
35169
  console.log(
35026
- chalk221.dim(
35170
+ chalk227.dim(
35027
35171
  `
35028
35172
  Summary: ${plan2.moves.length} file(s) moved, ${plan2.rewrites.length} imports rewritten across ${rewrittenFiles} file(s), ${plan2.errors.length} error(s)`
35029
35173
  )
@@ -35035,11 +35179,11 @@ function runPlan(plan2, limits, apply) {
35035
35179
  displayPlan2(plan2);
35036
35180
  displayLayoutLimits(limits, applyCommand(plan2.scopeRoot));
35037
35181
  if (plan2.moves.length === 0 && plan2.errors.length === 0) {
35038
- console.log(chalk222.green("No restructuring needed"));
35182
+ console.log(chalk228.green("No restructuring needed"));
35039
35183
  return;
35040
35184
  }
35041
35185
  if (!apply) {
35042
- console.log(chalk222.dim("\nDry run. Use --apply to execute."));
35186
+ console.log(chalk228.dim("\nDry run. Use --apply to execute."));
35043
35187
  return;
35044
35188
  }
35045
35189
  applyPlan(plan2);
@@ -35049,14 +35193,14 @@ function runPlan(plan2, limits, apply) {
35049
35193
  async function restructure(root2, options2 = {}) {
35050
35194
  const scopeRoot = path82.resolve(root2 ?? "src");
35051
35195
  if (!fs37.existsSync(scopeRoot) || !fs37.statSync(scopeRoot).isDirectory()) {
35052
- console.log(chalk223.red(`Not a directory: ${root2 ?? "src"}`));
35196
+ console.log(chalk229.red(`Not a directory: ${root2 ?? "src"}`));
35053
35197
  process.exit(1);
35054
35198
  }
35055
35199
  const found = [];
35056
35200
  walkSourceFiles(scopeRoot, found);
35057
35201
  const { scoped, ignored } = partitionIgnored(found);
35058
35202
  if (scoped.length === 0) {
35059
- console.log(chalk223.yellow("No files found under root"));
35203
+ console.log(chalk229.yellow("No files found under root"));
35060
35204
  return;
35061
35205
  }
35062
35206
  const {
@@ -35127,7 +35271,7 @@ async function checkoutPrSession(number, prompt = "") {
35127
35271
  }
35128
35272
 
35129
35273
  // src/commands/review/highLevel/configureHighLevelReview.ts
35130
- import chalk227 from "chalk";
35274
+ import chalk233 from "chalk";
35131
35275
 
35132
35276
  // src/commands/config/promptConfigScope.ts
35133
35277
  import Enquirer3 from "enquirer";
@@ -35153,7 +35297,7 @@ async function promptConfigScope() {
35153
35297
  }
35154
35298
 
35155
35299
  // src/commands/config/resolveConfigKeyAnswer.ts
35156
- import chalk224 from "chalk";
35300
+ import chalk230 from "chalk";
35157
35301
  async function resolveConfigKeyAnswer(question, supplied) {
35158
35302
  if (supplied !== void 0) return coerceSupplied(question.key, supplied);
35159
35303
  for (; ; ) {
@@ -35161,7 +35305,7 @@ async function resolveConfigKeyAnswer(question, supplied) {
35161
35305
  if (answer === "") return void 0;
35162
35306
  const coercion = coerceCliConfigValue(question.key, answer);
35163
35307
  if (coercion.ok) return coercion.value;
35164
- console.error(chalk224.red(coercion.error));
35308
+ console.error(chalk230.red(coercion.error));
35165
35309
  }
35166
35310
  }
35167
35311
  function coerceSupplied(key, supplied) {
@@ -35241,7 +35385,7 @@ function suggestGlobs(current, proposed) {
35241
35385
  }
35242
35386
 
35243
35387
  // src/commands/review/highLevel/parseConfigureAnswers.ts
35244
- import chalk225 from "chalk";
35388
+ import chalk231 from "chalk";
35245
35389
  function parseConfigureAnswers(answers) {
35246
35390
  const known = Object.values(highLevelConfigKeys);
35247
35391
  const parsed = {};
@@ -35259,13 +35403,13 @@ function answersCoverEveryKey(answers) {
35259
35403
  return Object.values(highLevelConfigKeys).every((key) => key in answers);
35260
35404
  }
35261
35405
  function exitWith(message3) {
35262
- console.error(chalk225.red(`Error: ${message3}.`));
35406
+ console.error(chalk231.red(`Error: ${message3}.`));
35263
35407
  process.exit(1);
35264
35408
  }
35265
35409
 
35266
35410
  // src/commands/review/highLevel/proposeHighLevelGlobs.ts
35267
35411
  import { execFileSync as execFileSync25 } from "child_process";
35268
- import chalk226 from "chalk";
35412
+ import chalk232 from "chalk";
35269
35413
 
35270
35414
  // src/commands/review/highLevel/buildGlobProposalPrompt.ts
35271
35415
  function buildGlobProposalPrompt(tree) {
@@ -35359,12 +35503,12 @@ function proposeHighLevelGlobs(cwd = process.cwd()) {
35359
35503
  const tree = summariseRepoTree(cwd);
35360
35504
  if (tree === "") return NOTHING_PROPOSED;
35361
35505
  console.log(
35362
- chalk226.dim("Asking Claude to propose globs from the repo's own tree...")
35506
+ chalk232.dim("Asking Claude to propose globs from the repo's own tree...")
35363
35507
  );
35364
35508
  const output = askClaude(buildGlobProposalPrompt(tree), cwd);
35365
35509
  if (output === void 0) {
35366
35510
  console.log(
35367
- chalk226.yellow(
35511
+ chalk232.yellow(
35368
35512
  "Claude proposed nothing; answer each key from its current value."
35369
35513
  )
35370
35514
  );
@@ -35428,14 +35572,14 @@ function asConfigKeyScope(value) {
35428
35572
  function reportConfigured(result) {
35429
35573
  for (const write of result.written)
35430
35574
  console.log(
35431
- chalk227.green(`Set ${write.key} = ${JSON.stringify(write.value)}`)
35575
+ chalk233.green(`Set ${write.key} = ${JSON.stringify(write.value)}`)
35432
35576
  );
35433
- for (const key of result.skipped) console.log(chalk227.dim(`Left ${key} unset`));
35434
- console.log(chalk227.dim(`Written to ${result.target}`));
35577
+ for (const key of result.skipped) console.log(chalk233.dim(`Left ${key} unset`));
35578
+ console.log(chalk233.dim(`Written to ${result.target}`));
35435
35579
  }
35436
35580
 
35437
35581
  // src/commands/review/highLevel/announceSavedReview.ts
35438
- import chalk228 from "chalk";
35582
+ import chalk234 from "chalk";
35439
35583
  function savedMessage(subject) {
35440
35584
  const head = subject.headSha.slice(0, 7);
35441
35585
  if (subject.draft)
@@ -35446,10 +35590,10 @@ function savedMessage(subject) {
35446
35590
  }
35447
35591
  function announceSavedReview(subject, force) {
35448
35592
  const message3 = savedMessage(subject);
35449
- if (message3) console.log(chalk228.dim(message3));
35593
+ if (message3) console.log(chalk234.dim(message3));
35450
35594
  else if (force)
35451
35595
  console.log(
35452
- chalk228.dim(
35596
+ chalk234.dim(
35453
35597
  `Discarding any review saved for ${subject.headSha.slice(0, 7)} and starting fresh (--force).`
35454
35598
  )
35455
35599
  );
@@ -36544,55 +36688,55 @@ async function openHighLevelOverlay(sessionId, subject) {
36544
36688
  }
36545
36689
 
36546
36690
  // src/commands/review/highLevel/printHighLevelChecklist.ts
36547
- import chalk233 from "chalk";
36691
+ import chalk239 from "chalk";
36548
36692
 
36549
36693
  // src/commands/review/highLevel/formatCriticalDiffs.ts
36550
- import chalk229 from "chalk";
36694
+ import chalk235 from "chalk";
36551
36695
  var PATCH_LINE_COLOURS = {
36552
- "+": chalk229.green,
36553
- "-": chalk229.red,
36554
- "@": chalk229.cyan
36696
+ "+": chalk235.green,
36697
+ "-": chalk235.red,
36698
+ "@": chalk235.cyan
36555
36699
  };
36556
36700
  function formatPatch(patch2) {
36557
36701
  return patch2.split("\n").map(
36558
- (line) => ` ${(PATCH_LINE_COLOURS[line[0] ?? ""] ?? chalk229.dim)(line)}`
36702
+ (line) => ` ${(PATCH_LINE_COLOURS[line[0] ?? ""] ?? chalk235.dim)(line)}`
36559
36703
  );
36560
36704
  }
36561
36705
  function formatDiff(diff3) {
36562
36706
  return [
36563
36707
  "",
36564
- ` ${chalk229.bold(diff3.path)} ${chalk229.dim(`(${diff3.status})`)} ${chalk229.green(`+${diff3.additions}`)} ${chalk229.red(`-${diff3.deletions}`)}`,
36565
- ...diff3.patch === null ? [` ${chalk229.dim(`no diff available; see ${diff3.diffUrl}`)}`] : formatPatch(diff3.patch)
36708
+ ` ${chalk235.bold(diff3.path)} ${chalk235.dim(`(${diff3.status})`)} ${chalk235.green(`+${diff3.additions}`)} ${chalk235.red(`-${diff3.deletions}`)}`,
36709
+ ...diff3.patch === null ? [` ${chalk235.dim(`no diff available; see ${diff3.diffUrl}`)}`] : formatPatch(diff3.patch)
36566
36710
  ];
36567
36711
  }
36568
36712
  function formatCriticalDiffs(diffs, criticalPaths) {
36569
36713
  if (criticalPaths.length === 0)
36570
- return `${chalk229.bold.underline("Critical diffs")}
36571
- ${chalk229.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
36714
+ return `${chalk235.bold.underline("Critical diffs")}
36715
+ ${chalk235.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
36572
36716
  if (diffs.length === 0)
36573
- return `${chalk229.bold.underline("Critical diffs")}
36574
- ${chalk229.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
36717
+ return `${chalk235.bold.underline("Critical diffs")}
36718
+ ${chalk235.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
36575
36719
  return [
36576
- chalk229.bold.underline("Critical diffs"),
36720
+ chalk235.bold.underline("Critical diffs"),
36577
36721
  ...diffs.flatMap(formatDiff)
36578
36722
  ].join("\n");
36579
36723
  }
36580
36724
 
36581
36725
  // src/commands/review/highLevel/formatHighLevelChecklist.ts
36582
- import chalk230 from "chalk";
36726
+ import chalk236 from "chalk";
36583
36727
  var MARKERS = {
36584
- pass: () => chalk230.green("\u2714"),
36585
- fail: () => chalk230.red("\u2718"),
36586
- manual: () => chalk230.yellow("\u25A1")
36728
+ pass: () => chalk236.green("\u2714"),
36729
+ fail: () => chalk236.red("\u2718"),
36730
+ manual: () => chalk236.yellow("\u25A1")
36587
36731
  };
36588
36732
  function formatCheck(check2) {
36589
- const title = check2.status === "fail" ? chalk230.red(check2.title) : chalk230.bold(check2.title);
36733
+ const title = check2.status === "fail" ? chalk236.red(check2.title) : chalk236.bold(check2.title);
36590
36734
  return ` ${MARKERS[check2.status]()} ${title}
36591
- ${chalk230.dim(check2.reason)}`;
36735
+ ${chalk236.dim(check2.reason)}`;
36592
36736
  }
36593
36737
  function formatGroup(heading2, checks2) {
36594
36738
  if (checks2.length === 0) return [];
36595
- return ["", chalk230.bold.underline(heading2), ...checks2.map(formatCheck)];
36739
+ return ["", chalk236.bold.underline(heading2), ...checks2.map(formatCheck)];
36596
36740
  }
36597
36741
  function formatHighLevelChecklist(checks2) {
36598
36742
  const deterministic = checks2.filter(
@@ -36601,7 +36745,7 @@ function formatHighLevelChecklist(checks2) {
36601
36745
  const failed3 = deterministic.filter(
36602
36746
  (check2) => check2.status === "fail"
36603
36747
  ).length;
36604
- const summary = failed3 === 0 ? chalk230.green(`All ${deterministic.length} deterministic checks pass`) : chalk230.red(
36748
+ const summary = failed3 === 0 ? chalk236.green(`All ${deterministic.length} deterministic checks pass`) : chalk236.red(
36605
36749
  `${failed3} of ${deterministic.length} deterministic checks fail`
36606
36750
  );
36607
36751
  return [
@@ -36616,37 +36760,37 @@ function formatHighLevelChecklist(checks2) {
36616
36760
  }
36617
36761
 
36618
36762
  // src/commands/review/highLevel/formatHighLevelStructure.ts
36619
- import chalk231 from "chalk";
36763
+ import chalk237 from "chalk";
36620
36764
  var STATUS_MARKERS = {
36621
- added: () => chalk231.green("A"),
36622
- removed: () => chalk231.red("D"),
36623
- modified: () => chalk231.yellow("M")
36765
+ added: () => chalk237.green("A"),
36766
+ removed: () => chalk237.red("D"),
36767
+ modified: () => chalk237.yellow("M")
36624
36768
  };
36625
36769
  function counts(additions, deletions) {
36626
- return `${chalk231.green(`+${additions}`)} ${chalk231.red(`-${deletions}`)}`;
36770
+ return `${chalk237.green(`+${additions}`)} ${chalk237.red(`-${deletions}`)}`;
36627
36771
  }
36628
36772
  function formatNode(node, indent3) {
36629
36773
  if (node.kind === "file")
36630
36774
  return [
36631
- `${indent3}${STATUS_MARKERS[node.status]()} ${node.name} ${chalk231.dim(counts(node.additions, node.deletions))}`
36775
+ `${indent3}${STATUS_MARKERS[node.status]()} ${node.name} ${chalk237.dim(counts(node.additions, node.deletions))}`
36632
36776
  ];
36633
36777
  const dir = node;
36634
36778
  return [
36635
- `${indent3}${chalk231.bold(`${dir.name}/`)} ${chalk231.dim(counts(dir.additions, dir.deletions))}`,
36779
+ `${indent3}${chalk237.bold(`${dir.name}/`)} ${chalk237.dim(counts(dir.additions, dir.deletions))}`,
36636
36780
  ...dir.children.flatMap((child) => formatNode(child, `${indent3} `))
36637
36781
  ];
36638
36782
  }
36639
36783
  function formatHighLevelStructure(structure) {
36640
36784
  const summary = `${structure.added} added \xB7 ${structure.removed} deleted \xB7 ${structure.modified} modified \xB7 ${counts(structure.additions, structure.deletions)}`;
36641
36785
  return [
36642
- chalk231.bold.underline("Structure"),
36786
+ chalk237.bold.underline("Structure"),
36643
36787
  ` ${summary}`,
36644
36788
  ...structure.tree.flatMap((node) => formatNode(node, " "))
36645
36789
  ].join("\n");
36646
36790
  }
36647
36791
 
36648
36792
  // src/commands/review/highLevel/formatHighLevelTests.ts
36649
- import chalk232 from "chalk";
36793
+ import chalk238 from "chalk";
36650
36794
  function changeMarker(change) {
36651
36795
  if (change === "added") return "A";
36652
36796
  if (change === "modified") return "M";
@@ -36655,22 +36799,22 @@ function changeMarker(change) {
36655
36799
  function formatNode2(node, depth) {
36656
36800
  const indent3 = " ".repeat(depth + 2);
36657
36801
  if (node.kind === "it")
36658
- return [`${indent3}${chalk232.dim(changeMarker(node.change))} ${node.name}`];
36802
+ return [`${indent3}${chalk238.dim(changeMarker(node.change))} ${node.name}`];
36659
36803
  return [
36660
- `${indent3}${chalk232.bold(node.name)}`,
36804
+ `${indent3}${chalk238.bold(node.name)}`,
36661
36805
  ...node.children.flatMap((child) => formatNode2(child, depth + 1))
36662
36806
  ];
36663
36807
  }
36664
36808
  function formatHighLevelTests(files, testPaths) {
36665
- const heading2 = chalk232.bold.underline("Changed tests");
36809
+ const heading2 = chalk238.bold.underline("Changed tests");
36666
36810
  if (files.length === 0)
36667
36811
  return `${heading2}
36668
- ${chalk232.dim(`no changed test in files matching ${testPaths.join(", ")}`)}`;
36812
+ ${chalk238.dim(`no changed test in files matching ${testPaths.join(", ")}`)}`;
36669
36813
  return [
36670
36814
  heading2,
36671
36815
  ...files.flatMap((file) => [
36672
36816
  "",
36673
- ` ${chalk232.bold(file.path)} ${chalk232.dim(`(${file.status})`)}`,
36817
+ ` ${chalk238.bold(file.path)} ${chalk238.dim(`(${file.status})`)}`,
36674
36818
  ...file.tests.flatMap((node) => formatNode2(node, 0))
36675
36819
  ])
36676
36820
  ].join("\n");
@@ -36684,10 +36828,10 @@ function highLevelChangedFileCount(structure) {
36684
36828
  // src/commands/review/highLevel/printHighLevelChecklist.ts
36685
36829
  function printHighLevelChecklist(subject) {
36686
36830
  console.log(
36687
- chalk233.bold(
36831
+ chalk239.bold(
36688
36832
  `High-level review of ${subject.repo}#${subject.prNumber} \u2014 ${subject.title}`
36689
36833
  ),
36690
- chalk233.dim(
36834
+ chalk239.dim(
36691
36835
  `\xB7 ${highLevelChangedFileCount(subject.structure)} changed files`
36692
36836
  )
36693
36837
  );
@@ -36701,12 +36845,12 @@ function printHighLevelChecklist(subject) {
36701
36845
  console.log("");
36702
36846
  console.log(formatHighLevelTests(subject.tests, subject.testPaths));
36703
36847
  console.log(
36704
- chalk233.dim(
36848
+ chalk239.dim(
36705
36849
  "\nManual items are for the reviewer to judge; see docs/high-level-review.md."
36706
36850
  )
36707
36851
  );
36708
36852
  console.log(
36709
- chalk233.dim(
36853
+ chalk239.dim(
36710
36854
  "Run this inside an assist session to step through the checklist in the web overlay."
36711
36855
  )
36712
36856
  );
@@ -36992,18 +37136,18 @@ function partitionFindingsByDiff(findings, index2) {
36992
37136
  }
36993
37137
 
36994
37138
  // src/commands/review/warnOutOfDiff.ts
36995
- import chalk234 from "chalk";
37139
+ import chalk240 from "chalk";
36996
37140
  function warnOutOfDiff(outOfDiff) {
36997
37141
  if (outOfDiff.length === 0) return;
36998
37142
  console.warn(
36999
- chalk234.yellow(
37143
+ chalk240.yellow(
37000
37144
  `Moved ${outOfDiff.length} finding(s) whose lines fall outside the PR diff into the review body (GitHub cannot anchor a comment on these):`
37001
37145
  )
37002
37146
  );
37003
37147
  for (const finding of outOfDiff) {
37004
37148
  const range = finding.startLine !== void 0 ? `${finding.startLine}-${finding.line}` : `${finding.line}`;
37005
37149
  console.warn(
37006
- ` ${chalk234.yellow("\xB7")} ${finding.title} ${chalk234.dim(
37150
+ ` ${chalk240.yellow("\xB7")} ${finding.title} ${chalk240.dim(
37007
37151
  `(${finding.file}:${range})`
37008
37152
  )}`
37009
37153
  );
@@ -37027,18 +37171,18 @@ function selectInDiffFindings(lineBound, prDiff) {
37027
37171
  }
37028
37172
 
37029
37173
  // src/commands/review/warnUnlocated.ts
37030
- import chalk235 from "chalk";
37174
+ import chalk241 from "chalk";
37031
37175
  function warnUnlocated(unlocated) {
37032
37176
  if (unlocated.length === 0) return;
37033
37177
  console.warn(
37034
- chalk235.yellow(
37178
+ chalk241.yellow(
37035
37179
  `Moved ${unlocated.length} finding(s) without a parseable file:line into the review body:`
37036
37180
  )
37037
37181
  );
37038
37182
  for (const finding of unlocated) {
37039
- const where = finding.location || chalk235.dim("missing");
37183
+ const where = finding.location || chalk241.dim("missing");
37040
37184
  console.warn(
37041
- ` ${chalk235.yellow("\xB7")} ${finding.title} ${chalk235.dim(`(${where})`)}`
37185
+ ` ${chalk241.yellow("\xB7")} ${finding.title} ${chalk241.dim(`(${where})`)}`
37042
37186
  );
37043
37187
  }
37044
37188
  }
@@ -39181,7 +39325,7 @@ function registerReview(program) {
39181
39325
  // src/commands/rules/addRule.ts
39182
39326
  import { existsSync as existsSync72, readFileSync as readFileSync56, writeFileSync as writeFileSync42 } from "fs";
39183
39327
  import path87 from "path";
39184
- import chalk236 from "chalk";
39328
+ import chalk242 from "chalk";
39185
39329
 
39186
39330
  // src/commands/rules/insertRuleBullet.ts
39187
39331
  function ruleBullet({ code, title, text: text17 }) {
@@ -39317,7 +39461,7 @@ function read2(file) {
39317
39461
  function addRule(text17, options2) {
39318
39462
  const rule = text17.trim();
39319
39463
  if (rule === "") {
39320
- console.error(chalk236.red("Rule text is required"));
39464
+ console.error(chalk242.red("Rule text is required"));
39321
39465
  process.exitCode = 1;
39322
39466
  return;
39323
39467
  }
@@ -39335,13 +39479,13 @@ function addRule(text17, options2) {
39335
39479
  );
39336
39480
  updateScopedRulesIndex(root2);
39337
39481
  console.log(
39338
- `Added ${chalk236.cyan(code)} to ${path87.relative(process.cwd(), target) || target}`
39482
+ `Added ${chalk242.cyan(code)} to ${path87.relative(process.cwd(), target) || target}`
39339
39483
  );
39340
39484
  }
39341
39485
 
39342
39486
  // src/commands/rules/indexRules.ts
39343
39487
  import path88 from "path";
39344
- import chalk237 from "chalk";
39488
+ import chalk243 from "chalk";
39345
39489
  function indexRules() {
39346
39490
  const startDir = scopeDirectory(process.cwd());
39347
39491
  const root2 = findRepoRoot(startDir) ?? startDir;
@@ -39349,24 +39493,24 @@ function indexRules() {
39349
39493
  const rootFile = path88.relative(process.cwd(), path88.join(root2, "CLAUDE.md"));
39350
39494
  if (directories.length === 0) {
39351
39495
  console.log(
39352
- chalk237.gray(`No directories carry their own \`## Rules\` under ${root2}`)
39496
+ chalk243.gray(`No directories carry their own \`## Rules\` under ${root2}`)
39353
39497
  );
39354
39498
  return;
39355
39499
  }
39356
39500
  console.log(`Recorded in ${rootFile || "CLAUDE.md"}`);
39357
39501
  for (const directory of directories)
39358
- console.log(` ${chalk237.cyan(directory)}`);
39502
+ console.log(` ${chalk243.cyan(directory)}`);
39359
39503
  }
39360
39504
 
39361
39505
  // src/commands/rules/listRules.ts
39362
39506
  import path89 from "path";
39363
- import chalk238 from "chalk";
39507
+ import chalk244 from "chalk";
39364
39508
  function listRules(target, options2 = {}) {
39365
39509
  const resolved = path89.resolve(target ?? process.cwd());
39366
39510
  const rules2 = readScopedRules(resolved);
39367
39511
  if (rules2.length === 0) {
39368
39512
  const label2 = path89.relative(process.cwd(), resolved) || ".";
39369
- console.log(chalk238.gray(`No rules in scope for ${label2}`));
39513
+ console.log(chalk244.gray(`No rules in scope for ${label2}`));
39370
39514
  return;
39371
39515
  }
39372
39516
  const base = findRepoRoot(scopeDirectory(resolved));
@@ -39376,14 +39520,14 @@ function listRules(target, options2 = {}) {
39376
39520
  if (rule.source !== shown) {
39377
39521
  shown = rule.source;
39378
39522
  console.log(
39379
- chalk238.dim(base ? path89.relative(base, rule.source) : rule.source)
39523
+ chalk244.dim(base ? path89.relative(base, rule.source) : rule.source)
39380
39524
  );
39381
39525
  }
39382
39526
  console.log(
39383
- ` ${chalk238.cyan(rule.code.padEnd(width2))} ${rule.title ?? rule.text}`
39527
+ ` ${chalk244.cyan(rule.code.padEnd(width2))} ${rule.title ?? rule.text}`
39384
39528
  );
39385
39529
  if (options2.full && rule.title)
39386
- console.log(` ${" ".repeat(width2)} ${chalk238.dim(rule.text)}`);
39530
+ console.log(` ${" ".repeat(width2)} ${chalk244.dim(rule.text)}`);
39387
39531
  }
39388
39532
  }
39389
39533
 
@@ -39412,7 +39556,7 @@ function registerRules(program) {
39412
39556
  }
39413
39557
 
39414
39558
  // src/commands/seq/seqAuth.ts
39415
- import chalk240 from "chalk";
39559
+ import chalk246 from "chalk";
39416
39560
 
39417
39561
  // src/commands/seq/loadConnections.ts
39418
39562
  function loadConnections2() {
@@ -39441,10 +39585,10 @@ function setDefaultConnection(name) {
39441
39585
  }
39442
39586
 
39443
39587
  // src/shared/assertUniqueName.ts
39444
- import chalk239 from "chalk";
39588
+ import chalk245 from "chalk";
39445
39589
  function assertUniqueName(existingNames, name) {
39446
39590
  if (existingNames.includes(name)) {
39447
- console.error(chalk239.red(`Connection "${name}" already exists.`));
39591
+ console.error(chalk245.red(`Connection "${name}" already exists.`));
39448
39592
  process.exit(1);
39449
39593
  }
39450
39594
  }
@@ -39462,16 +39606,16 @@ async function promptConnection2(existingNames) {
39462
39606
  var seqAuth = createConnectionAuth({
39463
39607
  load: loadConnections2,
39464
39608
  save: saveConnections2,
39465
- format: (c) => `${chalk240.bold(c.name)} ${c.url}`,
39609
+ format: (c) => `${chalk246.bold(c.name)} ${c.url}`,
39466
39610
  promptNew: promptConnection2,
39467
39611
  onFirst: (c) => setDefaultConnection(c.name)
39468
39612
  });
39469
39613
 
39470
39614
  // src/commands/seq/seqQuery.ts
39471
- import chalk244 from "chalk";
39615
+ import chalk250 from "chalk";
39472
39616
 
39473
39617
  // src/commands/seq/fetchSeq.ts
39474
- import chalk241 from "chalk";
39618
+ import chalk247 from "chalk";
39475
39619
  async function fetchSeq(conn, path108, params) {
39476
39620
  const url = `${conn.url}${path108}?${params}`;
39477
39621
  const response = await fetch(url, {
@@ -39482,7 +39626,7 @@ async function fetchSeq(conn, path108, params) {
39482
39626
  });
39483
39627
  if (!response.ok) {
39484
39628
  const body = await response.text();
39485
- console.error(chalk241.red(`Seq returned ${response.status}: ${body}`));
39629
+ console.error(chalk247.red(`Seq returned ${response.status}: ${body}`));
39486
39630
  process.exit(1);
39487
39631
  }
39488
39632
  return response;
@@ -39541,23 +39685,23 @@ async function fetchSeqEvents(conn, params) {
39541
39685
  }
39542
39686
 
39543
39687
  // src/commands/seq/formatEvent.ts
39544
- import chalk242 from "chalk";
39688
+ import chalk248 from "chalk";
39545
39689
  function levelColor(level) {
39546
39690
  switch (level) {
39547
39691
  case "Fatal":
39548
- return chalk242.bgRed.white;
39692
+ return chalk248.bgRed.white;
39549
39693
  case "Error":
39550
- return chalk242.red;
39694
+ return chalk248.red;
39551
39695
  case "Warning":
39552
- return chalk242.yellow;
39696
+ return chalk248.yellow;
39553
39697
  case "Information":
39554
- return chalk242.cyan;
39698
+ return chalk248.cyan;
39555
39699
  case "Debug":
39556
- return chalk242.gray;
39700
+ return chalk248.gray;
39557
39701
  case "Verbose":
39558
- return chalk242.dim;
39702
+ return chalk248.dim;
39559
39703
  default:
39560
- return chalk242.white;
39704
+ return chalk248.white;
39561
39705
  }
39562
39706
  }
39563
39707
  function levelAbbrev(level) {
@@ -39598,12 +39742,12 @@ function formatTimestamp(iso) {
39598
39742
  function formatEvent(event) {
39599
39743
  const color = levelColor(event.Level);
39600
39744
  const abbrev = levelAbbrev(event.Level);
39601
- const ts10 = chalk242.dim(formatTimestamp(event.Timestamp));
39745
+ const ts10 = chalk248.dim(formatTimestamp(event.Timestamp));
39602
39746
  const msg = renderMessage(event);
39603
39747
  const lines2 = [`${ts10} ${color(`[${abbrev}]`)} ${msg}`];
39604
39748
  if (event.Exception) {
39605
39749
  for (const line of event.Exception.split("\n")) {
39606
- lines2.push(chalk242.red(` ${line}`));
39750
+ lines2.push(chalk248.red(` ${line}`));
39607
39751
  }
39608
39752
  }
39609
39753
  return lines2.join("\n");
@@ -39636,11 +39780,11 @@ function rejectTimestampFilter(filter) {
39636
39780
  }
39637
39781
 
39638
39782
  // src/shared/resolveNamedConnection.ts
39639
- import chalk243 from "chalk";
39783
+ import chalk249 from "chalk";
39640
39784
  function resolveNamedConnection(connections, requested, defaultName, kind, authCommand) {
39641
39785
  if (connections.length === 0) {
39642
39786
  console.error(
39643
- chalk243.red(
39787
+ chalk249.red(
39644
39788
  `No ${kind} connections configured. Run '${authCommand}' first.`
39645
39789
  )
39646
39790
  );
@@ -39649,7 +39793,7 @@ function resolveNamedConnection(connections, requested, defaultName, kind, authC
39649
39793
  const target = requested ?? defaultName ?? connections[0].name;
39650
39794
  const connection = connections.find((c) => c.name === target);
39651
39795
  if (!connection) {
39652
- console.error(chalk243.red(`${kind} connection "${target}" not found.`));
39796
+ console.error(chalk249.red(`${kind} connection "${target}" not found.`));
39653
39797
  process.exit(1);
39654
39798
  }
39655
39799
  return connection;
@@ -39678,7 +39822,7 @@ async function seqQuery(filter, options2) {
39678
39822
  new URLSearchParams({ filter, count: String(count10) })
39679
39823
  );
39680
39824
  if (events.length === 0) {
39681
- console.log(chalk244.yellow("No events found."));
39825
+ console.log(chalk250.yellow("No events found."));
39682
39826
  return;
39683
39827
  }
39684
39828
  if (options2.json) {
@@ -39689,11 +39833,11 @@ async function seqQuery(filter, options2) {
39689
39833
  for (const event of chronological) {
39690
39834
  console.log(formatEvent(event));
39691
39835
  }
39692
- console.log(chalk244.dim(`
39836
+ console.log(chalk250.dim(`
39693
39837
  ${events.length} events`));
39694
39838
  if (events.length >= count10) {
39695
39839
  console.log(
39696
- chalk244.yellow(
39840
+ chalk250.yellow(
39697
39841
  `Results limited to ${count10}. Use --count to retrieve more.`
39698
39842
  )
39699
39843
  );
@@ -39701,10 +39845,10 @@ ${events.length} events`));
39701
39845
  }
39702
39846
 
39703
39847
  // src/shared/setNamedDefaultConnection.ts
39704
- import chalk245 from "chalk";
39848
+ import chalk251 from "chalk";
39705
39849
  function setNamedDefaultConnection(connections, name, setDefault, kind) {
39706
39850
  if (!connections.find((c) => c.name === name)) {
39707
- console.error(chalk245.red(`Connection "${name}" not found.`));
39851
+ console.error(chalk251.red(`Connection "${name}" not found.`));
39708
39852
  process.exit(1);
39709
39853
  }
39710
39854
  setDefault(name);
@@ -40005,7 +40149,7 @@ function registerSlack(program) {
40005
40149
  }
40006
40150
 
40007
40151
  // src/commands/sql/sqlAuth.ts
40008
- import chalk247 from "chalk";
40152
+ import chalk253 from "chalk";
40009
40153
 
40010
40154
  // src/commands/sql/loadConnections.ts
40011
40155
  function loadConnections3() {
@@ -40034,7 +40178,7 @@ function setDefaultConnection2(name) {
40034
40178
  }
40035
40179
 
40036
40180
  // src/commands/sql/promptConnection.ts
40037
- import chalk246 from "chalk";
40181
+ import chalk252 from "chalk";
40038
40182
  async function promptConnection3(existingNames) {
40039
40183
  const name = await promptInput("name", "Connection name:", "default");
40040
40184
  assertUniqueName(existingNames, name);
@@ -40042,7 +40186,7 @@ async function promptConnection3(existingNames) {
40042
40186
  const portStr = await promptInput("port", "Port:", "1433");
40043
40187
  const port = Number.parseInt(portStr, 10);
40044
40188
  if (!Number.isFinite(port)) {
40045
- console.error(chalk246.red(`Invalid port "${portStr}".`));
40189
+ console.error(chalk252.red(`Invalid port "${portStr}".`));
40046
40190
  process.exit(1);
40047
40191
  }
40048
40192
  const user = await promptInput("user", "User:");
@@ -40055,13 +40199,13 @@ async function promptConnection3(existingNames) {
40055
40199
  var sqlAuth = createConnectionAuth({
40056
40200
  load: loadConnections3,
40057
40201
  save: saveConnections3,
40058
- format: (c) => `${chalk247.bold(c.name)} ${c.server}:${c.port}/${c.database} (${c.user})`,
40202
+ format: (c) => `${chalk253.bold(c.name)} ${c.server}:${c.port}/${c.database} (${c.user})`,
40059
40203
  promptNew: promptConnection3,
40060
40204
  onFirst: (c) => setDefaultConnection2(c.name)
40061
40205
  });
40062
40206
 
40063
40207
  // src/commands/sql/printTable.ts
40064
- import chalk248 from "chalk";
40208
+ import chalk254 from "chalk";
40065
40209
  function formatCell(value) {
40066
40210
  if (value === null || value === void 0) return "";
40067
40211
  if (value instanceof Date) return value.toISOString();
@@ -40070,7 +40214,7 @@ function formatCell(value) {
40070
40214
  }
40071
40215
  function printTable(rows) {
40072
40216
  if (rows.length === 0) {
40073
- console.log(chalk248.yellow("(no rows)"));
40217
+ console.log(chalk254.yellow("(no rows)"));
40074
40218
  return;
40075
40219
  }
40076
40220
  const columns = Object.keys(rows[0]);
@@ -40078,13 +40222,13 @@ function printTable(rows) {
40078
40222
  (col) => Math.max(col.length, ...rows.map((r) => formatCell(r[col]).length))
40079
40223
  );
40080
40224
  const header = columns.map((c, i) => c.padEnd(widths[i])).join(" ");
40081
- console.log(chalk248.dim(header));
40082
- console.log(chalk248.dim("-".repeat(header.length)));
40225
+ console.log(chalk254.dim(header));
40226
+ console.log(chalk254.dim("-".repeat(header.length)));
40083
40227
  for (const row3 of rows) {
40084
40228
  const line = columns.map((c, i) => formatCell(row3[c]).padEnd(widths[i])).join(" ");
40085
40229
  console.log(line);
40086
40230
  }
40087
- console.log(chalk248.dim(`
40231
+ console.log(chalk254.dim(`
40088
40232
  ${rows.length} row${rows.length === 1 ? "" : "s"}`));
40089
40233
  }
40090
40234
 
@@ -40144,7 +40288,7 @@ async function sqlColumns(table, connectionName) {
40144
40288
  }
40145
40289
 
40146
40290
  // src/commands/sql/sqlMutate.ts
40147
- import chalk249 from "chalk";
40291
+ import chalk255 from "chalk";
40148
40292
 
40149
40293
  // src/commands/sql/isMutation.ts
40150
40294
  var MUTATION_KEYWORDS = [
@@ -40178,7 +40322,7 @@ function isMutation(sql27) {
40178
40322
  async function sqlMutate(query, connectionName) {
40179
40323
  if (!isMutation(query)) {
40180
40324
  console.error(
40181
- chalk249.red(
40325
+ chalk255.red(
40182
40326
  "assist sql mutate refuses non-mutating statements. Use `assist sql query` instead."
40183
40327
  )
40184
40328
  );
@@ -40188,18 +40332,18 @@ async function sqlMutate(query, connectionName) {
40188
40332
  const pool = await sqlConnect(conn);
40189
40333
  try {
40190
40334
  const result = await pool.request().query(query);
40191
- console.log(chalk249.dim(`${result.rowsAffected.join(", ")} row(s) affected`));
40335
+ console.log(chalk255.dim(`${result.rowsAffected.join(", ")} row(s) affected`));
40192
40336
  } finally {
40193
40337
  await pool.close();
40194
40338
  }
40195
40339
  }
40196
40340
 
40197
40341
  // src/commands/sql/sqlQuery.ts
40198
- import chalk250 from "chalk";
40342
+ import chalk256 from "chalk";
40199
40343
  async function sqlQuery(query, connectionName) {
40200
40344
  if (isMutation(query)) {
40201
40345
  console.error(
40202
- chalk250.red(
40346
+ chalk256.red(
40203
40347
  "assist sql query refuses mutating statements. Use `assist sql mutate` instead."
40204
40348
  )
40205
40349
  );
@@ -40214,7 +40358,7 @@ async function sqlQuery(query, connectionName) {
40214
40358
  printTable(rows);
40215
40359
  } else {
40216
40360
  console.log(
40217
- chalk250.dim(`${result.rowsAffected.join(", ")} row(s) affected`)
40361
+ chalk256.dim(`${result.rowsAffected.join(", ")} row(s) affected`)
40218
40362
  );
40219
40363
  }
40220
40364
  } finally {
@@ -40629,7 +40773,7 @@ function syncPi(claudeDir, options2) {
40629
40773
  // src/commands/sync/syncSettings.ts
40630
40774
  import * as fs46 from "fs";
40631
40775
  import * as path100 from "path";
40632
- import chalk251 from "chalk";
40776
+ import chalk257 from "chalk";
40633
40777
  async function syncSettings(claudeDir, targetBase, options2) {
40634
40778
  const source = path100.join(claudeDir, "settings.json");
40635
40779
  const target = path100.join(targetBase, "settings.json");
@@ -40648,7 +40792,7 @@ async function syncSettings(claudeDir, targetBase, options2) {
40648
40792
  if (mergedContent !== normalizedTarget) {
40649
40793
  if (!options2?.yes) {
40650
40794
  console.log(
40651
- chalk251.yellow(
40795
+ chalk257.yellow(
40652
40796
  "\n\u26A0\uFE0F Warning: settings.json differs from existing file"
40653
40797
  )
40654
40798
  );
@@ -40656,7 +40800,7 @@ async function syncSettings(claudeDir, targetBase, options2) {
40656
40800
  printDiff(targetContent, mergedContent);
40657
40801
  printAutoConfirmHint();
40658
40802
  const confirm = await promptConfirm(
40659
- chalk251.red("Overwrite existing settings.json?"),
40803
+ chalk257.red("Overwrite existing settings.json?"),
40660
40804
  false
40661
40805
  );
40662
40806
  if (!confirm) {
@@ -41087,7 +41231,7 @@ async function configure() {
41087
41231
  // src/commands/transcript/list.ts
41088
41232
  import { existsSync as existsSync78, readdirSync as readdirSync20, statSync as statSync12 } from "fs";
41089
41233
  import { join as join97 } from "path";
41090
- function list3() {
41234
+ function list4() {
41091
41235
  const { vttDir } = getTranscriptConfig();
41092
41236
  if (!existsSync78(vttDir)) return;
41093
41237
  for (const entry of readdirSync20(vttDir)) {
@@ -41370,7 +41514,7 @@ function registerTranscript(program) {
41370
41514
  const transcriptCommand = program.command("transcript").description("Meeting transcript utilities").addHelpText("after", () => transcriptWorkflowHelp());
41371
41515
  configHelp(transcriptCommand, transcriptConfigHelp);
41372
41516
  transcriptCommand.command("configure").description("Configure transcript directories").action(configure);
41373
- transcriptCommand.command("list").description("List raw .vtt filenames waiting in the pick-up directory").action(list3);
41517
+ transcriptCommand.command("list").description("List raw .vtt filenames waiting in the pick-up directory").action(list4);
41374
41518
  transcriptCommand.command("clean <path>").description("Clean any .vtt file and write the result to stdout").option("--format <md|vtt>", "output format", "md").option(
41375
41519
  "--timestamps",
41376
41520
  "prefix each speaker turn with its start time (--format md only)"
@@ -41384,9 +41528,9 @@ function registerTranscript(program) {
41384
41528
  // src/commands/verify/reportVerifyProblems.ts
41385
41529
  function verifySection(label2, entries) {
41386
41530
  if (entries.length === 0) return void 0;
41387
- const list5 = entries.sort().map((entry) => ` ${entry}`).join("\n");
41531
+ const list6 = entries.sort().map((entry) => ` ${entry}`).join("\n");
41388
41532
  return `${label2}:
41389
- ${list5}`;
41533
+ ${list6}`;
41390
41534
  }
41391
41535
  function reportVerifyProblems(problems, success) {
41392
41536
  const found = problems.filter(
@@ -42133,7 +42277,7 @@ function registerVerifyChecks(verifyCommand) {
42133
42277
  }
42134
42278
 
42135
42279
  // src/commands/verify/list.ts
42136
- function list4() {
42280
+ function list5() {
42137
42281
  const entries = resolveEntries();
42138
42282
  if (entries.length === 0) {
42139
42283
  console.error("No verify commands found");
@@ -42160,7 +42304,7 @@ function registerVerify(program) {
42160
42304
  "--measure",
42161
42305
  "Print a summary table of each command's status and duration after the run"
42162
42306
  ).option("--verbose", "Show all output (bypass CLAUDECODE suppression)").action(runScope);
42163
- verifyCommand.command("list").description("List configured verify commands").action(list4);
42307
+ verifyCommand.command("list").description("List configured verify commands").action(list5);
42164
42308
  verifyCommand.command("init").description("Add verify scripts to a project").option(
42165
42309
  "--package-json",
42166
42310
  "Write scripts to package.json instead of assist.yml"
@@ -42906,7 +43050,7 @@ function registerWatch(program) {
42906
43050
 
42907
43051
  // src/commands/roam/auth.ts
42908
43052
  import { randomBytes } from "crypto";
42909
- import chalk252 from "chalk";
43053
+ import chalk258 from "chalk";
42910
43054
 
42911
43055
  // src/commands/roam/waitForCallback.ts
42912
43056
  import { createServer as createServer3 } from "http";
@@ -43037,13 +43181,13 @@ async function auth() {
43037
43181
  saveGlobalConfig(config);
43038
43182
  const state = randomBytes(16).toString("hex");
43039
43183
  console.log(
43040
- chalk252.yellow("\nEnsure this Redirect URI is set in your Roam OAuth app:")
43184
+ chalk258.yellow("\nEnsure this Redirect URI is set in your Roam OAuth app:")
43041
43185
  );
43042
- console.log(chalk252.white("http://localhost:14523/callback\n"));
43043
- console.log(chalk252.blue("Opening browser for authorization..."));
43044
- console.log(chalk252.dim("Waiting for authorization callback..."));
43186
+ console.log(chalk258.white("http://localhost:14523/callback\n"));
43187
+ console.log(chalk258.blue("Opening browser for authorization..."));
43188
+ console.log(chalk258.dim("Waiting for authorization callback..."));
43045
43189
  const { code, redirectUri } = await authorizeInBrowser(clientId, state);
43046
- console.log(chalk252.dim("Exchanging code for tokens..."));
43190
+ console.log(chalk258.dim("Exchanging code for tokens..."));
43047
43191
  const tokens = await exchangeToken({
43048
43192
  code,
43049
43193
  clientId,
@@ -43059,7 +43203,7 @@ async function auth() {
43059
43203
  };
43060
43204
  saveGlobalConfig(config);
43061
43205
  console.log(
43062
- chalk252.green("Roam credentials and tokens saved to ~/.assist.yml")
43206
+ chalk258.green("Roam credentials and tokens saved to ~/.assist.yml")
43063
43207
  );
43064
43208
  }
43065
43209
 
@@ -43348,12 +43492,12 @@ function parseEnvPairs(pairs) {
43348
43492
  if (pairs.length === 0) return void 0;
43349
43493
  const env = {};
43350
43494
  for (const pair of pairs) {
43351
- const eq45 = pair.indexOf("=");
43352
- if (eq45 <= 0) {
43495
+ const eq46 = pair.indexOf("=");
43496
+ if (eq46 <= 0) {
43353
43497
  console.error(`--env must be KEY=VALUE, got "${pair}"`);
43354
43498
  process.exit(1);
43355
43499
  }
43356
- env[pair.slice(0, eq45)] = pair.slice(eq45 + 1);
43500
+ env[pair.slice(0, eq46)] = pair.slice(eq46 + 1);
43357
43501
  }
43358
43502
  return env;
43359
43503
  }
@@ -43366,11 +43510,11 @@ function fail7(spec) {
43366
43510
  process.exit(1);
43367
43511
  }
43368
43512
  function parseParamSpec(spec) {
43369
- const eq45 = spec.indexOf("=");
43370
- const name = eq45 === -1 ? spec : spec.slice(0, eq45);
43371
- if (eq45 !== -1) {
43372
- if (eq45 === 0 || name.endsWith("!")) fail7(spec);
43373
- return { name, default: spec.slice(eq45 + 1) };
43513
+ const eq46 = spec.indexOf("=");
43514
+ const name = eq46 === -1 ? spec : spec.slice(0, eq46);
43515
+ if (eq46 !== -1) {
43516
+ if (eq46 === 0 || name.endsWith("!")) fail7(spec);
43517
+ return { name, default: spec.slice(eq46 + 1) };
43374
43518
  }
43375
43519
  if (name.endsWith("!")) {
43376
43520
  if (name.length === 1) fail7(spec);
@@ -43598,7 +43742,7 @@ function removeProjectRunConfig(name) {
43598
43742
  saveConfig(config);
43599
43743
  deleteCommandFile(name);
43600
43744
  }
43601
- async function remove(name, options2 = {}) {
43745
+ async function remove2(name, options2 = {}) {
43602
43746
  if (options2.repo !== void 0) {
43603
43747
  const label2 = await removeRepoRunConfig(
43604
43748
  name,
@@ -43621,7 +43765,7 @@ function registerRunSubcommands(runCommand) {
43621
43765
  ).argument("<name>", "Name of the run configuration to remove").option(
43622
43766
  "--repo [name]",
43623
43767
  "Remove from a repo's override in the shared db instead of assist.yml (defaults to the current repo)"
43624
- ).action((name, opts) => remove(name, opts));
43768
+ ).action((name, opts) => remove2(name, opts));
43625
43769
  }
43626
43770
 
43627
43771
  // src/commands/run/registerRun.ts
@@ -43635,18 +43779,18 @@ function registerRun(program) {
43635
43779
  }
43636
43780
 
43637
43781
  // src/commands/sessions/nodes/formatLink.ts
43638
- import chalk253 from "chalk";
43782
+ import chalk259 from "chalk";
43639
43783
  var STATE_COLOURS = {
43640
- connected: chalk253.green,
43641
- connecting: chalk253.yellow,
43642
- disconnected: chalk253.red,
43643
- "version-blocked": chalk253.red
43784
+ connected: chalk259.green,
43785
+ connecting: chalk259.yellow,
43786
+ disconnected: chalk259.red,
43787
+ "version-blocked": chalk259.red
43644
43788
  };
43645
43789
  function formatLink(link3) {
43646
- const colour = STATE_COLOURS[link3.state] ?? chalk253.white;
43790
+ const colour = STATE_COLOURS[link3.state] ?? chalk259.white;
43647
43791
  const peer = link3.peerVersion ? ` peer ${link3.peerVersion}` : "";
43648
43792
  const error = link3.error ? `
43649
- ${chalk253.dim(`last error${link3.errorAt ? ` ${link3.errorAt}` : ""}: ${link3.error}`)}` : "";
43793
+ ${chalk259.dim(`last error${link3.errorAt ? ` ${link3.errorAt}` : ""}: ${link3.error}`)}` : "";
43650
43794
  return ` ${link3.name} ${colour(link3.state)} ${link3.url}${peer}${error}`;
43651
43795
  }
43652
43796
 
@@ -45528,14 +45672,14 @@ function reason2(error) {
45528
45672
 
45529
45673
  // src/commands/sessions/daemon/worktree/removeTree.ts
45530
45674
  async function removeTree(clone, worktreePath, force) {
45531
- const remove2 = (forced) => git2(clone, [
45675
+ const remove3 = (forced) => git2(clone, [
45532
45676
  "worktree",
45533
45677
  "remove",
45534
45678
  ...forced ? ["--force"] : [],
45535
45679
  worktreePath
45536
45680
  ]);
45537
45681
  try {
45538
- await remove2(force);
45682
+ await remove3(force);
45539
45683
  return { removed: true };
45540
45684
  } catch (error) {
45541
45685
  daemonLog(`worktree ${worktreePath} removal failed: ${reason3(error)}`);
@@ -45546,11 +45690,11 @@ async function removeTree(clone, worktreePath, force) {
45546
45690
  `its work was discarded and git could not remove it: ${reason3(error)}`
45547
45691
  );
45548
45692
  }
45549
- return await removeIgnoringLeftovers(clone, remove2, worktreePath);
45693
+ return await removeIgnoringLeftovers(clone, remove3, worktreePath);
45550
45694
  }
45551
- async function removeIgnoringLeftovers(clone, remove2, worktreePath) {
45695
+ async function removeIgnoringLeftovers(clone, remove3, worktreePath) {
45552
45696
  try {
45553
- await remove2(true);
45697
+ await remove3(true);
45554
45698
  daemonLog(
45555
45699
  `worktree ${worktreePath} removed on retry; only ignored files remained, its work is landed`
45556
45700
  );
@@ -46563,10 +46707,10 @@ function applyReviewPause(session, activity2) {
46563
46707
  }
46564
46708
 
46565
46709
  // src/shared/db/getPhaseActiveMs.ts
46566
- import { and as and17, eq as eq43 } from "drizzle-orm";
46710
+ import { and as and17, eq as eq44 } from "drizzle-orm";
46567
46711
  async function getPhaseActiveMs(db, itemId2, phaseIdx) {
46568
46712
  const [row3] = await db.select({ activeMs: phaseUsage.activeMs }).from(phaseUsage).where(
46569
- and17(eq43(phaseUsage.itemId, itemId2), eq43(phaseUsage.phaseIdx, phaseIdx))
46713
+ and17(eq44(phaseUsage.itemId, itemId2), eq44(phaseUsage.phaseIdx, phaseIdx))
46570
46714
  );
46571
46715
  return row3?.activeMs ?? 0;
46572
46716
  }
@@ -47408,7 +47552,7 @@ async function recordPhaseTranscriptUsage(db, itemId2, phaseIdx, responses) {
47408
47552
  }
47409
47553
 
47410
47554
  // src/shared/db/recordWindowTokens.ts
47411
- import { and as and18, eq as eq44, sql as sql26 } from "drizzle-orm";
47555
+ import { and as and18, eq as eq45, sql as sql26 } from "drizzle-orm";
47412
47556
  async function recordWindowTokens(db, window, resetsAt, tokensUp, tokensDown) {
47413
47557
  if (tokensUp <= 0 && tokensDown <= 0) return;
47414
47558
  await db.update(usagePeaks).set({
@@ -47416,9 +47560,9 @@ async function recordWindowTokens(db, window, resetsAt, tokensUp, tokensDown) {
47416
47560
  tokensDown: sql26`${usagePeaks.tokensDown} + ${tokensDown}`
47417
47561
  }).where(
47418
47562
  and18(
47419
- eq44(usagePeaks.window, window),
47420
- eq44(usagePeaks.resetsAt, resetsAt),
47421
- eq44(usagePeaks.segment, 0)
47563
+ eq45(usagePeaks.window, window),
47564
+ eq45(usagePeaks.resetsAt, resetsAt),
47565
+ eq45(usagePeaks.segment, 0)
47422
47566
  )
47423
47567
  );
47424
47568
  }
@@ -51328,7 +51472,7 @@ async function closeSession() {
51328
51472
  }
51329
51473
 
51330
51474
  // src/commands/sessions/nodes/listNodes.ts
51331
- import chalk254 from "chalk";
51475
+ import chalk260 from "chalk";
51332
51476
  async function nodesReport() {
51333
51477
  const live = await queryNodes();
51334
51478
  if (live)
@@ -51345,10 +51489,10 @@ async function listNodes(options2) {
51345
51489
  console.log(JSON.stringify(report, null, 2));
51346
51490
  return;
51347
51491
  }
51348
- console.log(`${report.local} ${chalk254.dim("(this node)")}`);
51492
+ console.log(`${report.local} ${chalk260.dim("(this node)")}`);
51349
51493
  if (!report.daemonRunning)
51350
- console.log(chalk254.dim(" daemon not running; showing configured links"));
51351
- if (report.links.length === 0) console.log(chalk254.dim(" no links"));
51494
+ console.log(chalk260.dim(" daemon not running; showing configured links"));
51495
+ if (report.links.length === 0) console.log(chalk260.dim(" no links"));
51352
51496
  for (const link3 of report.links) console.log(formatLink(link3));
51353
51497
  }
51354
51498
 
@@ -51370,7 +51514,7 @@ async function findUnlinkedWindowsNode(health2, platform = detectPlatform()) {
51370
51514
  }
51371
51515
 
51372
51516
  // src/commands/sessions/nodes/printReport.ts
51373
- import chalk255 from "chalk";
51517
+ import chalk261 from "chalk";
51374
51518
  function printReport(report) {
51375
51519
  if (report.links.length === 0) {
51376
51520
  console.log(`${report.local} has no links`);
@@ -51384,11 +51528,11 @@ function printReport(report) {
51384
51528
  for (const diagnosis of report.links) printDiagnosis(diagnosis);
51385
51529
  }
51386
51530
  function printDiagnosis(diagnosis) {
51387
- console.log(`${chalk255.bold(diagnosis.name)} ${chalk255.dim(diagnosis.url)}`);
51531
+ console.log(`${chalk261.bold(diagnosis.name)} ${chalk261.dim(diagnosis.url)}`);
51388
51532
  for (const hop of diagnosis.hops) {
51389
- const mark = hop.ok ? chalk255.green("\u2713") : chalk255.red("\u2717");
51533
+ const mark = hop.ok ? chalk261.green("\u2713") : chalk261.red("\u2717");
51390
51534
  console.log(` ${mark} ${hop.hop.padEnd(9)} ${hop.detail ?? hop.error}`);
51391
- if (hop.remediation) console.log(` ${chalk255.yellow(hop.remediation)}`);
51535
+ if (hop.remediation) console.log(` ${chalk261.yellow(hop.remediation)}`);
51392
51536
  }
51393
51537
  }
51394
51538
 
@@ -51460,14 +51604,14 @@ function registerDiagnoseCommands(nodes, calledBy2) {
51460
51604
  }
51461
51605
 
51462
51606
  // src/commands/sessions/nodes/linkNode.ts
51463
- import chalk258 from "chalk";
51607
+ import chalk264 from "chalk";
51464
51608
 
51465
51609
  // src/commands/sessions/nodes/notifyDaemonLinks.ts
51466
- import chalk256 from "chalk";
51610
+ import chalk262 from "chalk";
51467
51611
  async function notifyDaemonLinks() {
51468
51612
  if (!await isDaemonRunning()) {
51469
51613
  console.log(
51470
- chalk256.yellow(
51614
+ chalk262.yellow(
51471
51615
  "The sessions daemon is not running; it loads the links when it starts."
51472
51616
  )
51473
51617
  );
@@ -51475,11 +51619,11 @@ async function notifyDaemonLinks() {
51475
51619
  }
51476
51620
  try {
51477
51621
  await sendToDaemonAwaitAck({ type: "reload-links" });
51478
- console.log(chalk256.dim("The sessions daemon reloaded its links."));
51622
+ console.log(chalk262.dim("The sessions daemon reloaded its links."));
51479
51623
  } catch (error) {
51480
51624
  const message3 = error instanceof Error ? error.message : String(error);
51481
51625
  console.log(
51482
- chalk256.yellow(
51626
+ chalk262.yellow(
51483
51627
  `Could not notify the sessions daemon (${message3}); run \`assist daemon restart\` to apply the change.`
51484
51628
  )
51485
51629
  );
@@ -51487,7 +51631,7 @@ async function notifyDaemonLinks() {
51487
51631
  }
51488
51632
 
51489
51633
  // src/commands/sessions/nodes/readLinks.ts
51490
- import chalk257 from "chalk";
51634
+ import chalk263 from "chalk";
51491
51635
 
51492
51636
  // src/commands/sessions/nodes/writeLinks.ts
51493
51637
  async function writeLinks(links2) {
@@ -51510,7 +51654,7 @@ async function readLinks() {
51510
51654
  await writeLinks(links2);
51511
51655
  const dropped = stored.filter((link3) => !link3.url).map((link3) => link3.name);
51512
51656
  console.log(
51513
- chalk257.yellow(`Removed ${dropped.join(", ")}: ${SSH_LINK_RETIRED}`)
51657
+ chalk263.yellow(`Removed ${dropped.join(", ")}: ${SSH_LINK_RETIRED}`)
51514
51658
  );
51515
51659
  return links2;
51516
51660
  }
@@ -51566,7 +51710,7 @@ async function linkNode(name, url, options2) {
51566
51710
  throw new Error(`${name} is this node; link to a different node`);
51567
51711
  const link3 = await buildLink(name, url, options2);
51568
51712
  await writeLinks([...others, link3]);
51569
- console.log(chalk258.green(`Linked ${name} (${link3.url})`));
51713
+ console.log(chalk264.green(`Linked ${name} (${link3.url})`));
51570
51714
  await notifyDaemonLinks();
51571
51715
  }
51572
51716
 
@@ -51749,16 +51893,16 @@ function registerPeerActionCommands(nodes, calledBy2) {
51749
51893
  }
51750
51894
 
51751
51895
  // src/commands/sessions/nodes/unlinkNode.ts
51752
- import chalk259 from "chalk";
51896
+ import chalk265 from "chalk";
51753
51897
  async function unlinkNode(name) {
51754
51898
  const links2 = await readLinks();
51755
51899
  const remaining = links2.filter((link3) => link3.name !== name);
51756
51900
  if (remaining.length === links2.length) {
51757
- console.log(chalk259.yellow(`No link named ${name}`));
51901
+ console.log(chalk265.yellow(`No link named ${name}`));
51758
51902
  return;
51759
51903
  }
51760
51904
  await writeLinks(remaining);
51761
- console.log(chalk259.green(`Unlinked ${name}`));
51905
+ console.log(chalk265.green(`Unlinked ${name}`));
51762
51906
  await notifyDaemonLinks();
51763
51907
  }
51764
51908
 
@@ -51992,10 +52136,10 @@ function createProgram() {
51992
52136
  }
51993
52137
 
51994
52138
  // src/reportCliError.ts
51995
- import chalk260 from "chalk";
52139
+ import chalk266 from "chalk";
51996
52140
  function reportCliError(error) {
51997
52141
  if (error instanceof InvalidItemIdError || error instanceof AmbiguousRepoConfigError || error instanceof UnknownRepoConfigError || error instanceof MissingRunCwdError || error instanceof MiroExtractError) {
51998
- console.error(chalk260.red(error.message));
52142
+ console.error(chalk266.red(error.message));
51999
52143
  } else {
52000
52144
  console.error(error);
52001
52145
  }