@staff0rd/assist 0.853.1 → 0.853.2

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.853.1",
9
+ version: "0.853.2",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -2837,13 +2837,15 @@ function renderLineChart({
2837
2837
  }
2838
2838
 
2839
2839
  // src/commands/activity/fetchCommitsPerDay.ts
2840
- import { execSync as execSync10 } from "child_process";
2840
+ import { execFileSync as execFileSync2 } from "child_process";
2841
2841
  function fetchContributions(from, to) {
2842
2842
  const query = `{ viewer { contributionsCollection(from: "${from}T00:00:00Z", to: "${to}T23:59:59Z") { contributionCalendar { weeks { contributionDays { date contributionCount } } } } } }`;
2843
2843
  const jq = ".data.viewer.contributionsCollection.contributionCalendar.weeks[].contributionDays[]";
2844
- const raw = execSync10(`gh api graphql -f query='${query}' --jq '${jq}'`, {
2845
- encoding: "utf8"
2846
- }).trim();
2844
+ const raw = execFileSync2(
2845
+ "gh",
2846
+ ["api", "graphql", "-f", `query=${query}`, "--jq", jq],
2847
+ { encoding: "utf8" }
2848
+ ).trim();
2847
2849
  if (!raw) return [];
2848
2850
  return raw.split("\n").map((line) => {
2849
2851
  const obj = JSON.parse(line);
@@ -4368,10 +4370,10 @@ import { join as join19 } from "path";
4368
4370
  import chalk27 from "chalk";
4369
4371
 
4370
4372
  // src/commands/backup/readCrontab.ts
4371
- import { execSync as execSync11 } from "child_process";
4373
+ import { execSync as execSync10 } from "child_process";
4372
4374
  function readCrontab() {
4373
4375
  try {
4374
- return execSync11("crontab -l", {
4376
+ return execSync10("crontab -l", {
4375
4377
  encoding: "utf8",
4376
4378
  stdio: ["ignore", "pipe", "ignore"]
4377
4379
  });
@@ -4381,7 +4383,7 @@ function readCrontab() {
4381
4383
  }
4382
4384
  function writeCrontab(content) {
4383
4385
  try {
4384
- execSync11("crontab -", {
4386
+ execSync10("crontab -", {
4385
4387
  input: content,
4386
4388
  stdio: ["pipe", "ignore", "pipe"]
4387
4389
  });
@@ -4848,7 +4850,7 @@ async function recordGitRef(db, itemId2, ref) {
4848
4850
  }
4849
4851
 
4850
4852
  // src/commands/prs/getPreferredRemoteRepo.ts
4851
- import { execSync as execSync12 } from "child_process";
4853
+ import { execSync as execSync11 } from "child_process";
4852
4854
 
4853
4855
  // src/commands/prs/parseGitHubUrl.ts
4854
4856
  var GITHUB_URL_PATTERN = /(?:git@github\.com:|https:\/\/github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?\/?$/;
@@ -4861,7 +4863,7 @@ function parseGitHubUrl(url) {
4861
4863
  // src/commands/prs/getPreferredRemoteRepo.ts
4862
4864
  function tryGetRemoteUrl(remote, cwd) {
4863
4865
  try {
4864
- return execSync12(`git remote get-url ${remote}`, {
4866
+ return execSync11(`git remote get-url ${remote}`, {
4865
4867
  encoding: "utf8",
4866
4868
  stdio: ["pipe", "pipe", "pipe"],
4867
4869
  windowsHide: true,
@@ -4873,7 +4875,7 @@ function tryGetRemoteUrl(remote, cwd) {
4873
4875
  }
4874
4876
  function getCurrentBranchRemote(cwd) {
4875
4877
  try {
4876
- const ref = execSync12(
4878
+ const ref = execSync11(
4877
4879
  "git rev-parse --abbrev-ref --symbolic-full-name @{u}",
4878
4880
  {
4879
4881
  encoding: "utf8",
@@ -4890,7 +4892,7 @@ function getCurrentBranchRemote(cwd) {
4890
4892
  }
4891
4893
  function listRemotes(cwd) {
4892
4894
  try {
4893
- return execSync12("git remote", {
4895
+ return execSync11("git remote", {
4894
4896
  encoding: "utf8",
4895
4897
  stdio: ["pipe", "pipe", "pipe"],
4896
4898
  windowsHide: true,
@@ -5095,11 +5097,11 @@ function backupLocalBacklogFiles(dir) {
5095
5097
  }
5096
5098
 
5097
5099
  // src/commands/backlog/gitPullBacklog.ts
5098
- import { execSync as execSync13 } from "child_process";
5100
+ import { execSync as execSync12 } from "child_process";
5099
5101
  import chalk30 from "chalk";
5100
5102
  function gitPullBacklog(dir) {
5101
5103
  try {
5102
- execSync13("git pull --ff-only", {
5104
+ execSync12("git pull --ff-only", {
5103
5105
  cwd: dir,
5104
5106
  stdio: ["pipe", "pipe", "pipe"],
5105
5107
  windowsHide: true
@@ -5986,13 +5988,13 @@ async function beginAssociation(id, options2, clearPatch, label2) {
5986
5988
  }
5987
5989
 
5988
5990
  // src/commands/backlog/associate-github/fetchGithubIssueTitle.ts
5989
- import { execSync as execSync14 } from "child_process";
5991
+ import { execSync as execSync13 } from "child_process";
5990
5992
  function fetchGithubIssueTitle(issue) {
5991
5993
  const match = /^([^/]+)\/([^#]+)#(\d+)$/.exec(issue);
5992
5994
  if (!match) return void 0;
5993
5995
  const [, owner, repo, number] = match;
5994
5996
  try {
5995
- const result = execSync14(
5997
+ const result = execSync13(
5996
5998
  `gh issue view ${number} -R ${owner}/${repo} --json title`,
5997
5999
  { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
5998
6000
  );
@@ -6059,12 +6061,12 @@ import chalk39 from "chalk";
6059
6061
  import { eq as eq13 } from "drizzle-orm";
6060
6062
 
6061
6063
  // src/commands/jira/fetchIssue.ts
6062
- import { execSync as execSync15 } from "child_process";
6064
+ import { execSync as execSync14 } from "child_process";
6063
6065
  import chalk38 from "chalk";
6064
6066
  function fetchIssue(issueKey, fields) {
6065
6067
  let result;
6066
6068
  try {
6067
- result = execSync15(
6069
+ result = execSync14(
6068
6070
  `acli jira workitem view ${issueKey} -f ${fields} --json`,
6069
6071
  { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }
6070
6072
  );
@@ -7587,15 +7589,15 @@ import chalk72 from "chalk";
7587
7589
  import enquirer6 from "enquirer";
7588
7590
 
7589
7591
  // src/shared/pullIfConfigured.ts
7590
- import { execSync as execSync17 } from "child_process";
7592
+ import { execSync as execSync16 } from "child_process";
7591
7593
  import chalk62 from "chalk";
7592
7594
 
7593
7595
  // src/shared/catchUpToRemoteDefault.ts
7594
- import { execSync as execSync16 } from "child_process";
7596
+ import { execSync as execSync15 } from "child_process";
7595
7597
  import chalk61 from "chalk";
7596
7598
 
7597
7599
  // src/commands/sessions/daemon/worktree/git.ts
7598
- import { execFile, execFileSync as execFileSync2 } from "child_process";
7600
+ import { execFile, execFileSync as execFileSync3 } from "child_process";
7599
7601
  function isWindowsPath(cwd) {
7600
7602
  return /^[A-Za-z]:[\\/]/.test(cwd);
7601
7603
  }
@@ -7649,7 +7651,7 @@ function gitSyncResult(cwd, args) {
7649
7651
  }
7650
7652
  function gitSync(cwd, args) {
7651
7653
  const { file, argv, options: options2 } = gitInvocation(cwd, args);
7652
- return execFileSync2(file, argv, {
7654
+ return execFileSync3(file, argv, {
7653
7655
  ...options2,
7654
7656
  stdio: ["pipe", "pipe", "pipe"]
7655
7657
  }).toString();
@@ -7682,7 +7684,7 @@ function remoteDefaultBranch(clone) {
7682
7684
  // src/shared/catchUpToRemoteDefault.ts
7683
7685
  function catchUpToRemoteDefault() {
7684
7686
  try {
7685
- execSync16("git fetch", { stdio: "inherit" });
7687
+ execSync15("git fetch", { stdio: "inherit" });
7686
7688
  } catch {
7687
7689
  skip("git fetch failed");
7688
7690
  return;
@@ -7699,7 +7701,7 @@ function catchUpToRemoteDefault() {
7699
7701
  return;
7700
7702
  }
7701
7703
  try {
7702
- execSync16(`git merge --ff-only ${ref}`, { stdio: "inherit" });
7704
+ execSync15(`git merge --ff-only ${ref}`, { stdio: "inherit" });
7703
7705
  } catch {
7704
7706
  console.error(chalk61.red(`git fast-forward to ${ref} failed; aborting.`));
7705
7707
  process.exit(1);
@@ -7710,7 +7712,7 @@ function skip(reason4) {
7710
7712
  }
7711
7713
  function succeeds(command) {
7712
7714
  try {
7713
- execSync16(command, { stdio: "ignore" });
7715
+ execSync15(command, { stdio: "ignore" });
7714
7716
  return true;
7715
7717
  } catch {
7716
7718
  return false;
@@ -7734,8 +7736,8 @@ function pullIfConfigured() {
7734
7736
  return;
7735
7737
  }
7736
7738
  try {
7737
- execSync17("git fetch", { stdio: "inherit" });
7738
- execSync17("git merge --ff-only @{u}", { stdio: "inherit" });
7739
+ execSync16("git fetch", { stdio: "inherit" });
7740
+ execSync16("git merge --ff-only @{u}", { stdio: "inherit" });
7739
7741
  } catch {
7740
7742
  console.error(chalk62.red("git fast-forward to upstream failed; aborting."));
7741
7743
  process.exit(1);
@@ -7743,7 +7745,7 @@ function pullIfConfigured() {
7743
7745
  }
7744
7746
  function hasUpstream() {
7745
7747
  try {
7746
- execSync17("git rev-parse --abbrev-ref --symbolic-full-name @{upstream}", {
7748
+ execSync16("git rev-parse --abbrev-ref --symbolic-full-name @{upstream}", {
7747
7749
  encoding: "utf8",
7748
7750
  stdio: ["ignore", "pipe", "ignore"]
7749
7751
  });
@@ -7754,7 +7756,7 @@ function hasUpstream() {
7754
7756
  }
7755
7757
  function hasLocalChanges() {
7756
7758
  try {
7757
- const status2 = execSync17("git status --porcelain", {
7759
+ const status2 = execSync16("git status --porcelain", {
7758
7760
  encoding: "utf8"
7759
7761
  });
7760
7762
  return status2.trim().length > 0;
@@ -7968,11 +7970,11 @@ function buildArgs(prompt, options2) {
7968
7970
  }
7969
7971
 
7970
7972
  // src/commands/backlog/ensureStoryBranch.ts
7971
- import { execSync as execSync20 } from "child_process";
7973
+ import { execSync as execSync19 } from "child_process";
7972
7974
  import { basename as basename6 } from "path";
7973
7975
 
7974
7976
  // src/commands/branch/createBranch.ts
7975
- import { execSync as execSync19 } from "child_process";
7977
+ import { execSync as execSync18 } from "child_process";
7976
7978
 
7977
7979
  // src/commands/branch/buildBranchName.ts
7978
7980
  function buildBranchName({
@@ -7988,12 +7990,12 @@ function buildBranchName({
7988
7990
  }
7989
7991
 
7990
7992
  // src/commands/branch/resolveDefaultBranch.ts
7991
- import { execSync as execSync18 } from "child_process";
7993
+ import { execSync as execSync17 } from "child_process";
7992
7994
  var REMOTE_HEAD_REGEX = /^ref:\s+refs\/heads\/(\S+)\s+HEAD$/m;
7993
7995
  function resolveDefaultBranch(override, cwd) {
7994
7996
  if (override) return override;
7995
7997
  try {
7996
- const output = execSync18("git ls-remote --symref origin HEAD", {
7998
+ const output = execSync17("git ls-remote --symref origin HEAD", {
7997
7999
  encoding: "utf8",
7998
8000
  stdio: ["pipe", "pipe", "pipe"],
7999
8001
  cwd
@@ -8017,11 +8019,11 @@ async function createBranch({
8017
8019
  jira,
8018
8020
  slug: slug2
8019
8021
  });
8020
- execSync19("git fetch", { stdio: "inherit" });
8022
+ execSync18("git fetch", { stdio: "inherit" });
8021
8023
  let baseRef;
8022
8024
  if (from) {
8023
8025
  try {
8024
- execSync19(`git rev-parse --verify ${shellQuote(from)}`, {
8026
+ execSync18(`git rev-parse --verify ${shellQuote(from)}`, {
8025
8027
  stdio: ["pipe", "pipe", "pipe"]
8026
8028
  });
8027
8029
  } catch {
@@ -8031,7 +8033,7 @@ async function createBranch({
8031
8033
  } else {
8032
8034
  baseRef = `origin/${resolveDefaultBranch(config.branch?.defaultBranch)}`;
8033
8035
  }
8034
- execSync19(`git switch -c ${shellQuote(branchName)} ${shellQuote(baseRef)}`, {
8036
+ execSync18(`git switch -c ${shellQuote(branchName)} ${shellQuote(baseRef)}`, {
8035
8037
  stdio: "inherit"
8036
8038
  });
8037
8039
  await recordBranchActivity(branchName);
@@ -8149,11 +8151,11 @@ function adoptRecordedBranch(item, branch2) {
8149
8151
  return;
8150
8152
  }
8151
8153
  try {
8152
- execSync20("git fetch", { stdio: "ignore" });
8154
+ execSync19("git fetch", { stdio: "ignore" });
8153
8155
  } catch {
8154
8156
  }
8155
8157
  try {
8156
- execSync20(`git switch ${shellQuote(branch2)}`, { stdio: "pipe" });
8158
+ execSync19(`git switch ${shellQuote(branch2)}`, { stdio: "pipe" });
8157
8159
  log(
8158
8160
  item,
8159
8161
  `branch ${branch2} already recorded; switched off ${parked} onto it`
@@ -8173,7 +8175,7 @@ function worktreeBranchInPlay() {
8173
8175
  }
8174
8176
  function currentBranch() {
8175
8177
  try {
8176
- return execSync20("git rev-parse --abbrev-ref HEAD", {
8178
+ return execSync19("git rev-parse --abbrev-ref HEAD", {
8177
8179
  encoding: "utf8",
8178
8180
  stdio: ["ignore", "pipe", "ignore"]
8179
8181
  }).trim();
@@ -8561,7 +8563,7 @@ import * as os2 from "os";
8561
8563
  import * as path19 from "path";
8562
8564
 
8563
8565
  // src/shared/checkCliAvailable.ts
8564
- import { execSync as execSync21 } from "child_process";
8566
+ import { execSync as execSync20 } from "child_process";
8565
8567
  function checkCliAvailable(cli) {
8566
8568
  const binary = cli.split(/\s+/)[0];
8567
8569
  const opts = {
@@ -8570,11 +8572,11 @@ function checkCliAvailable(cli) {
8570
8572
  windowsHide: true
8571
8573
  };
8572
8574
  try {
8573
- execSync21(`command -v ${binary}`, opts);
8575
+ execSync20(`command -v ${binary}`, opts);
8574
8576
  return true;
8575
8577
  } catch {
8576
8578
  try {
8577
- execSync21(`where ${binary}`, opts);
8579
+ execSync20(`where ${binary}`, opts);
8578
8580
  return true;
8579
8581
  } catch {
8580
8582
  return false;
@@ -11058,7 +11060,7 @@ function registerUpdateCommands(cmd) {
11058
11060
  import chalk111 from "chalk";
11059
11061
 
11060
11062
  // src/shared/getInstallDir.ts
11061
- import { execSync as execSync22 } from "child_process";
11063
+ import { execSync as execSync21 } from "child_process";
11062
11064
  import { dirname as dirname20, resolve as resolve10 } from "path";
11063
11065
  import { fileURLToPath as fileURLToPath3 } from "url";
11064
11066
  var __filename2 = fileURLToPath3(import.meta.url);
@@ -11068,7 +11070,7 @@ function getInstallDir() {
11068
11070
  }
11069
11071
  function isGitRepo(dir) {
11070
11072
  try {
11071
- const result = execSync22("git rev-parse --show-toplevel", {
11073
+ const result = execSync21("git rev-parse --show-toplevel", {
11072
11074
  cwd: dir,
11073
11075
  stdio: "pipe",
11074
11076
  windowsHide: true
@@ -11115,7 +11117,7 @@ import {
11115
11117
  import chalk106 from "chalk";
11116
11118
 
11117
11119
  // src/lib/openBrowser.ts
11118
- import { execSync as execSync23 } from "child_process";
11120
+ import { execSync as execSync22 } from "child_process";
11119
11121
 
11120
11122
  // src/lib/detectPlatform.ts
11121
11123
  import isWsl from "is-wsl";
@@ -11137,7 +11139,7 @@ function detectPlatform() {
11137
11139
  function tryExec(commands) {
11138
11140
  for (const cmd of commands) {
11139
11141
  try {
11140
- execSync23(cmd, { stdio: "ignore", windowsHide: true });
11142
+ execSync22(cmd, { stdio: "ignore", windowsHide: true });
11141
11143
  return true;
11142
11144
  } catch {
11143
11145
  }
@@ -15240,10 +15242,10 @@ function assertProjectScope() {
15240
15242
  }
15241
15243
 
15242
15244
  // src/shared/runGhOrThrow.ts
15243
- import { execFileSync as execFileSync3 } from "child_process";
15245
+ import { execFileSync as execFileSync4 } from "child_process";
15244
15246
  function runGhOrThrow(args, fallbackMessage) {
15245
15247
  try {
15246
- execFileSync3("gh", args, {
15248
+ execFileSync4("gh", args, {
15247
15249
  stdio: ["ignore", "ignore", "pipe"],
15248
15250
  encoding: "utf8"
15249
15251
  });
@@ -16825,13 +16827,13 @@ import { spawn as spawn4 } from "child_process";
16825
16827
  import { existsSync as existsSync39 } from "fs";
16826
16828
 
16827
16829
  // src/commands/run/resolveCommand.ts
16828
- import { execFileSync as execFileSync4 } from "child_process";
16830
+ import { execFileSync as execFileSync5 } from "child_process";
16829
16831
  import { existsSync as existsSync38 } from "fs";
16830
16832
  import { dirname as dirname22, join as join42, resolve as resolve14 } from "path";
16831
16833
  function resolveCommand(command) {
16832
16834
  if (process.platform !== "win32" || command !== "bash") return command;
16833
16835
  try {
16834
- const gitPath = execFileSync4("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
16836
+ const gitPath = execFileSync5("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
16835
16837
  const gitRoot = resolve14(dirname22(gitPath), "..");
16836
16838
  const gitBash = join42(gitRoot, "bin", "bash.exe");
16837
16839
  if (existsSync38(gitBash)) return gitBash;
@@ -17965,9 +17967,9 @@ function unsetConfig(req, res) {
17965
17967
  }
17966
17968
 
17967
17969
  // src/commands/watch/resolveUpstream.ts
17968
- import { execFileSync as execFileSync5 } from "child_process";
17970
+ import { execFileSync as execFileSync6 } from "child_process";
17969
17971
  function runGit3(args, cwd) {
17970
- return execFileSync5("git", args, {
17972
+ return execFileSync6("git", args, {
17971
17973
  encoding: "utf8",
17972
17974
  stdio: ["pipe", "pipe", "pipe"],
17973
17975
  cwd,
@@ -21199,7 +21201,7 @@ function registerCodexHook(program2) {
21199
21201
  }
21200
21202
 
21201
21203
  // src/commands/commit.ts
21202
- import { execSync as execSync30 } from "child_process";
21204
+ import { execSync as execSync29 } from "child_process";
21203
21205
 
21204
21206
  // src/commands/commit/buildCommitMessage.ts
21205
21207
  function buildCommitMessage(subject, refs) {
@@ -21208,17 +21210,17 @@ function buildCommitMessage(subject, refs) {
21208
21210
  }
21209
21211
 
21210
21212
  // src/commands/commit/execCommit.ts
21211
- import { execSync as execSync29 } from "child_process";
21213
+ import { execSync as execSync28 } from "child_process";
21212
21214
 
21213
21215
  // src/shared/warnIfUnexpectedBranch.ts
21214
- import { execSync as execSync25 } from "child_process";
21216
+ import { execSync as execSync24 } from "child_process";
21215
21217
  import chalk124 from "chalk";
21216
21218
 
21217
21219
  // src/shared/upstreamBranch.ts
21218
- import { execSync as execSync24 } from "child_process";
21220
+ import { execSync as execSync23 } from "child_process";
21219
21221
  function upstreamBranch() {
21220
21222
  try {
21221
- const upstream = execSync24(
21223
+ const upstream = execSync23(
21222
21224
  "git rev-parse --abbrev-ref --symbolic-full-name @{upstream}",
21223
21225
  { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }
21224
21226
  ).trim();
@@ -21252,7 +21254,7 @@ function warnIfUnexpectedBranch(config) {
21252
21254
  }
21253
21255
  function currentBranch3() {
21254
21256
  try {
21255
- return execSync25("git rev-parse --abbrev-ref HEAD", {
21257
+ return execSync24("git rev-parse --abbrev-ref HEAD", {
21256
21258
  encoding: "utf8"
21257
21259
  }).trim();
21258
21260
  } catch {
@@ -21261,10 +21263,10 @@ function currentBranch3() {
21261
21263
  }
21262
21264
 
21263
21265
  // src/commands/commit/findConflictMarkers.ts
21264
- import { execSync as execSync26 } from "child_process";
21266
+ import { execSync as execSync25 } from "child_process";
21265
21267
  function gitCheckOutput(cmd) {
21266
21268
  try {
21267
- return execSync26(cmd, { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] });
21269
+ return execSync25(cmd, { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] });
21268
21270
  } catch (error) {
21269
21271
  const stdout = error.stdout;
21270
21272
  if (typeof stdout === "string") return stdout;
@@ -21293,7 +21295,7 @@ function findConflictMarkers(files) {
21293
21295
  function findUnmergedPaths() {
21294
21296
  let output;
21295
21297
  try {
21296
- output = execSync26("git ls-files -u", {
21298
+ output = execSync25("git ls-files -u", {
21297
21299
  encoding: "utf8",
21298
21300
  stdio: ["pipe", "pipe", "pipe"]
21299
21301
  });
@@ -21362,12 +21364,12 @@ function collectCommitRefs(message3) {
21362
21364
  }
21363
21365
 
21364
21366
  // src/commands/commit/pushCommit.ts
21365
- import { execSync as execSync27 } from "child_process";
21367
+ import { execSync as execSync26 } from "child_process";
21366
21368
  var HEADS_PREFIX = "refs/heads/";
21367
21369
  function pushCommit(trunkMode) {
21368
21370
  const target = pushTargetForRenamedUpstream(trunkMode);
21369
21371
  const command = target ? `git push ${target.setUpstream ? "--set-upstream " : ""}${shellQuote(target.remote)} HEAD:${shellQuote(target.branch)}` : "git push";
21370
- execSync27(command, { stdio: "inherit" });
21372
+ execSync26(command, { stdio: "inherit" });
21371
21373
  }
21372
21374
  function pushTargetForRenamedUpstream(trunkMode) {
21373
21375
  const branch2 = gitOrNull2("git symbolic-ref --short HEAD");
@@ -21391,7 +21393,7 @@ function raiseOwnRemoteBranch(remote, branch2) {
21391
21393
  }
21392
21394
  function gitOrNull2(command) {
21393
21395
  try {
21394
- return execSync27(command, {
21396
+ return execSync26(command, {
21395
21397
  encoding: "utf8",
21396
21398
  stdio: ["pipe", "pipe", "pipe"]
21397
21399
  }).trim() || null;
@@ -21409,16 +21411,16 @@ function shouldPull(config) {
21409
21411
  }
21410
21412
 
21411
21413
  // src/commands/commit/stageAndCommit.ts
21412
- import { execSync as execSync28 } from "child_process";
21414
+ import { execSync as execSync27 } from "child_process";
21413
21415
  function commitStaged(message3) {
21414
- execSync28(`git commit -m ${shellQuote(message3)}`, { stdio: "inherit" });
21415
- return execSync28("git rev-parse --short=7 HEAD", {
21416
+ execSync27(`git commit -m ${shellQuote(message3)}`, { stdio: "inherit" });
21417
+ return execSync27("git rev-parse --short=7 HEAD", {
21416
21418
  encoding: "utf8"
21417
21419
  }).trim();
21418
21420
  }
21419
21421
  function stageAndCommit(files, message3) {
21420
21422
  const escaped = files.map(shellQuote).join(" ");
21421
- execSync28(`git add ${escaped}`, { stdio: "inherit" });
21423
+ execSync27(`git add ${escaped}`, { stdio: "inherit" });
21422
21424
  return commitStaged(message3);
21423
21425
  }
21424
21426
 
@@ -21428,7 +21430,7 @@ async function execCommit(files, message3, config) {
21428
21430
  warnIfUnexpectedBranch(config);
21429
21431
  const pulled = shouldPull(config);
21430
21432
  if (pulled) {
21431
- execSync29("git pull --autostash", { stdio: "inherit" });
21433
+ execSync28("git pull --autostash", { stdio: "inherit" });
21432
21434
  }
21433
21435
  abortOnConflicts(files, pulled);
21434
21436
  const sha = files.length > 0 ? stageAndCommit(files, message3) : commitStaged(message3);
@@ -21574,7 +21576,7 @@ function validateMessage(message3, config) {
21574
21576
  // src/commands/commit.ts
21575
21577
  async function commit(args, options2 = {}) {
21576
21578
  if (args[0] === "status") {
21577
- execSync30("git status && echo '---DIFF---' && git diff", {
21579
+ execSync29("git status && echo '---DIFF---' && git diff", {
21578
21580
  stdio: "inherit"
21579
21581
  });
21580
21582
  return;
@@ -22039,10 +22041,10 @@ function formatResultLine(entry, failing) {
22039
22041
  }
22040
22042
 
22041
22043
  // src/commands/complexity/maintainability/getMaintainabilityGitState.ts
22042
- import { execSync as execSync31 } from "child_process";
22044
+ import { execSync as execSync30 } from "child_process";
22043
22045
  import path34 from "path";
22044
22046
  function git2(command) {
22045
- return execSync31(command, { encoding: "utf8" });
22047
+ return execSync30(command, { encoding: "utf8" });
22046
22048
  }
22047
22049
  function toAbsolute(root2, repoRelative) {
22048
22050
  return path34.resolve(root2, repoRelative);
@@ -23140,7 +23142,7 @@ function registerDeploy(program2) {
23140
23142
  }
23141
23143
 
23142
23144
  // src/commands/devlog/list.ts
23143
- import { execFileSync as execFileSync6 } from "child_process";
23145
+ import { execFileSync as execFileSync7 } from "child_process";
23144
23146
  import { basename as basename17 } from "path";
23145
23147
 
23146
23148
  // src/commands/devlog/loadBlogSkipDays.ts
@@ -23155,7 +23157,7 @@ function loadBlogSkipDays(repoName) {
23155
23157
  }
23156
23158
 
23157
23159
  // src/commands/devlog/shared.ts
23158
- import { execSync as execSync32 } from "child_process";
23160
+ import { execSync as execSync31 } from "child_process";
23159
23161
  import chalk151 from "chalk";
23160
23162
 
23161
23163
  // src/shared/getRepoName.ts
@@ -23247,7 +23249,7 @@ function loadAllDevlogLatestDates() {
23247
23249
  // src/commands/devlog/shared.ts
23248
23250
  function getCommitFiles(hash) {
23249
23251
  try {
23250
- const output = execSync32(`git show --name-only --format="" ${hash}`, {
23252
+ const output = execSync31(`git show --name-only --format="" ${hash}`, {
23251
23253
  encoding: "utf8"
23252
23254
  });
23253
23255
  return output.trim().split("\n").filter(Boolean);
@@ -23320,7 +23322,7 @@ function list2(options2) {
23320
23322
  if (options2.reverse) args.push("--reverse");
23321
23323
  else args.push("-n", "500");
23322
23324
  args.push("--pretty=format:%ad|%h|%s", "--date=short");
23323
- const output = execFileSync6("git", args, { encoding: "utf8" });
23325
+ const output = execFileSync7("git", args, { encoding: "utf8" });
23324
23326
  const commitsByDate = parseGitLogCommits(output, ignore3);
23325
23327
  let dateCount = 0;
23326
23328
  let isFirst = true;
@@ -23343,11 +23345,11 @@ function list2(options2) {
23343
23345
  }
23344
23346
 
23345
23347
  // src/commands/devlog/getLastVersionInfo.ts
23346
- import { execFileSync as execFileSync7, execSync as execSync33 } from "child_process";
23348
+ import { execFileSync as execFileSync8, execSync as execSync32 } from "child_process";
23347
23349
  import semver from "semver";
23348
23350
  function getVersionAtCommit(hash) {
23349
23351
  try {
23350
- const content = execSync33(`git show ${hash}:package.json`, {
23352
+ const content = execSync32(`git show ${hash}:package.json`, {
23351
23353
  encoding: "utf8"
23352
23354
  });
23353
23355
  const pkg = JSON.parse(content);
@@ -23362,7 +23364,7 @@ function stripToMinor(version2) {
23362
23364
  }
23363
23365
  function getLastVersionInfoFromGit() {
23364
23366
  try {
23365
- const output = execFileSync7(
23367
+ const output = execFileSync8(
23366
23368
  "git",
23367
23369
  ["log", "-1", "--pretty=format:%ad|%h", "--date=short"],
23368
23370
  {
@@ -23407,7 +23409,7 @@ function bumpVersion(version2, type) {
23407
23409
  }
23408
23410
 
23409
23411
  // src/commands/devlog/next/displayNextEntry.ts
23410
- import { execFileSync as execFileSync8 } from "child_process";
23412
+ import { execFileSync as execFileSync9 } from "child_process";
23411
23413
  import chalk154 from "chalk";
23412
23414
 
23413
23415
  // src/commands/devlog/next/displayNextEntry/displayVersion.ts
@@ -23441,7 +23443,7 @@ function findTargetDate(commitsByDate, skipDays) {
23441
23443
  return Array.from(commitsByDate.keys()).filter((d) => !skipDays.has(d)).sort()[0];
23442
23444
  }
23443
23445
  function fetchCommitsByDate(ignore3, lastDate) {
23444
- const output = execFileSync8(
23446
+ const output = execFileSync9(
23445
23447
  "git",
23446
23448
  ["log", "--pretty=format:%ad|%h|%s", "--date=short", "-n", "500"],
23447
23449
  { encoding: "utf8" }
@@ -23520,7 +23522,7 @@ function next2(options2) {
23520
23522
  }
23521
23523
 
23522
23524
  // src/commands/devlog/repos.ts
23523
- import { execSync as execSync34 } from "child_process";
23525
+ import { execSync as execSync33 } from "child_process";
23524
23526
 
23525
23527
  // src/commands/devlog/repos/printReposTable.ts
23526
23528
  import chalk155 from "chalk";
@@ -23555,7 +23557,7 @@ function getStatus(lastPush, lastDevlog) {
23555
23557
  return lastDevlog < lastPush ? "outdated" : "ok";
23556
23558
  }
23557
23559
  function fetchRepos(days, all) {
23558
- const json = execSync34(
23560
+ const json = execSync33(
23559
23561
  "gh repo list staff0rd --json name,pushedAt,isArchived --limit 200",
23560
23562
  { encoding: "utf8" }
23561
23563
  );
@@ -23900,7 +23902,7 @@ async function deps(csprojPath, options2) {
23900
23902
  }
23901
23903
 
23902
23904
  // src/commands/dotnet/getChangedCsFiles.ts
23903
- import { execSync as execSync35 } from "child_process";
23905
+ import { execSync as execSync34 } from "child_process";
23904
23906
  var SCOPE_ALL = "all";
23905
23907
  var SCOPE_BASE = "base:";
23906
23908
  var SCOPE_COMMIT = "commit:";
@@ -23924,7 +23926,7 @@ function getChangedCsFiles(scope) {
23924
23926
  } else {
23925
23927
  cmd = "git diff --name-only HEAD";
23926
23928
  }
23927
- const output = execSync35(cmd, { encoding: "utf8" }).trim();
23929
+ const output = execSync34(cmd, { encoding: "utf8" }).trim();
23928
23930
  if (output === "") return [];
23929
23931
  return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
23930
23932
  }
@@ -24122,14 +24124,14 @@ function parseInspectReport(json) {
24122
24124
  }
24123
24125
 
24124
24126
  // src/commands/dotnet/runInspectCode.ts
24125
- import { execSync as execSync36 } from "child_process";
24127
+ import { execSync as execSync35 } from "child_process";
24126
24128
  import { existsSync as existsSync55, readFileSync as readFileSync39, unlinkSync as unlinkSync10 } from "fs";
24127
24129
  import { tmpdir as tmpdir4 } from "os";
24128
24130
  import path40 from "path";
24129
24131
  import chalk165 from "chalk";
24130
24132
  function assertJbInstalled() {
24131
24133
  try {
24132
- execSync36("jb inspectcode --version", { stdio: "pipe" });
24134
+ execSync35("jb inspectcode --version", { stdio: "pipe" });
24133
24135
  } catch {
24134
24136
  console.error(chalk165.red("jb is not installed. Install with:"));
24135
24137
  console.error(
@@ -24143,7 +24145,7 @@ function runInspectCode(slnPath, include, swea) {
24143
24145
  const includeFlag = include ? ` --include="${include}"` : "";
24144
24146
  const sweaFlag = swea ? " --swea" : "";
24145
24147
  try {
24146
- execSync36(
24148
+ execSync35(
24147
24149
  `jb inspectcode "${slnPath}" -o="${reportPath}"${includeFlag}${sweaFlag} --verbosity=OFF`,
24148
24150
  { stdio: "pipe" }
24149
24151
  );
@@ -24164,7 +24166,7 @@ function runInspectCode(slnPath, include, swea) {
24164
24166
  }
24165
24167
 
24166
24168
  // src/commands/dotnet/runRoslynInspect.ts
24167
- import { execSync as execSync37 } from "child_process";
24169
+ import { execSync as execSync36 } from "child_process";
24168
24170
  import chalk166 from "chalk";
24169
24171
  function resolveMsbuildPath() {
24170
24172
  const { run: run4 } = loadConfig();
@@ -24175,7 +24177,7 @@ function resolveMsbuildPath() {
24175
24177
  function assertMsbuildInstalled() {
24176
24178
  const msbuild = resolveMsbuildPath();
24177
24179
  try {
24178
- execSync37(`"${msbuild}" -version`, { stdio: "pipe" });
24180
+ execSync36(`"${msbuild}" -version`, { stdio: "pipe" });
24179
24181
  } catch {
24180
24182
  console.error(chalk166.red(`msbuild not found at: ${msbuild}`));
24181
24183
  console.error(
@@ -24201,7 +24203,7 @@ function runRoslynInspect(slnPath) {
24201
24203
  const msbuild = resolveMsbuildPath();
24202
24204
  let output;
24203
24205
  try {
24204
- output = execSync37(
24206
+ output = execSync36(
24205
24207
  `"${msbuild}" "${slnPath}" -t:Build -v:minimal -maxcpucount -p:EnforceCodeStyleInBuild=true -p:RunAnalyzersDuringBuild=true 2>&1`,
24206
24208
  { encoding: "utf8", stdio: "pipe", maxBuffer: 50 * 1024 * 1024 }
24207
24209
  );
@@ -25770,7 +25772,7 @@ Anything nested below the leaf level fails the run before a single write, naming
25770
25772
  }
25771
25773
 
25772
25774
  // src/commands/github/issue/commentIssue.ts
25773
- import { execFileSync as execFileSync9 } from "child_process";
25775
+ import { execFileSync as execFileSync10 } from "child_process";
25774
25776
 
25775
25777
  // src/shared/validateProposedContent.ts
25776
25778
  function validateProposedContent(labels, title, body) {
@@ -25831,7 +25833,7 @@ async function commentIssue(numberArg, options2) {
25831
25833
  const args = ["issue", "comment", String(number), "--body", body];
25832
25834
  if (options2.repo) args.push("--repo", options2.repo);
25833
25835
  try {
25834
- execFileSync9("gh", args, { stdio: "inherit" });
25836
+ execFileSync10("gh", args, { stdio: "inherit" });
25835
25837
  } catch {
25836
25838
  process.exit(1);
25837
25839
  }
@@ -26116,7 +26118,7 @@ function resolveIssueLabels(target, wanted) {
26116
26118
  }
26117
26119
 
26118
26120
  // src/commands/prs/shared.ts
26119
- import { execSync as execSync38 } from "child_process";
26121
+ import { execSync as execSync37 } from "child_process";
26120
26122
 
26121
26123
  // src/commands/prs/pinCurrentPr.ts
26122
26124
  var pinnedPr;
@@ -26139,19 +26141,19 @@ function getRepoInfo() {
26139
26141
  const preferred = getPreferredRemoteRepo();
26140
26142
  if (preferred) return preferred;
26141
26143
  const repoInfo = JSON.parse(
26142
- execSync38("gh repo view --json owner,name", { encoding: "utf8" })
26144
+ execSync37("gh repo view --json owner,name", { encoding: "utf8" })
26143
26145
  );
26144
26146
  return { org: repoInfo.owner.login, repo: repoInfo.name };
26145
26147
  }
26146
26148
  function getCurrentBranch2() {
26147
- return execSync38("git rev-parse --abbrev-ref HEAD", {
26149
+ return execSync37("git rev-parse --abbrev-ref HEAD", {
26148
26150
  encoding: "utf8"
26149
26151
  }).trim();
26150
26152
  }
26151
26153
  function viewCurrentPr(fields) {
26152
26154
  const { org, repo } = getRepoInfo();
26153
26155
  return JSON.parse(
26154
- execSync38(
26156
+ execSync37(
26155
26157
  `gh pr view ${currentPrSelector(getCurrentBranch2)} --json ${fields} -R ${org}/${repo}`,
26156
26158
  {
26157
26159
  encoding: "utf8"
@@ -26298,7 +26300,7 @@ function attachArgs(attachments) {
26298
26300
  }
26299
26301
 
26300
26302
  // src/commands/prs/runGhWithAttachments.ts
26301
- import { execFileSync as execFileSync10 } from "child_process";
26303
+ import { execFileSync as execFileSync11 } from "child_process";
26302
26304
  import { basename as basename18 } from "path";
26303
26305
 
26304
26306
  // src/shared/removeStagedAttachments.ts
@@ -26326,7 +26328,7 @@ function reportPartialFailure(attachments, stderr) {
26326
26328
  function runGhWithAttachments(args, attachments) {
26327
26329
  const attaching = attachments.length > 0;
26328
26330
  try {
26329
- const stdout = execFileSync10("gh", args, {
26331
+ const stdout = execFileSync11("gh", args, {
26330
26332
  encoding: "utf8",
26331
26333
  stdio: ["inherit", "pipe", attaching ? "pipe" : "inherit"]
26332
26334
  });
@@ -26437,7 +26439,7 @@ function inWebSession() {
26437
26439
  }
26438
26440
 
26439
26441
  // src/commands/github/issue/fetchIssue.ts
26440
- import { execFileSync as execFileSync11 } from "child_process";
26442
+ import { execFileSync as execFileSync12 } from "child_process";
26441
26443
  function fetchIssue2(number, repo) {
26442
26444
  const args = [
26443
26445
  "issue",
@@ -26449,7 +26451,7 @@ function fetchIssue2(number, repo) {
26449
26451
  if (repo) args.push("--repo", repo);
26450
26452
  let raw;
26451
26453
  try {
26452
- raw = execFileSync11("gh", args, { encoding: "utf8" });
26454
+ raw = execFileSync12("gh", args, { encoding: "utf8" });
26453
26455
  } catch {
26454
26456
  console.error(`Could not fetch issue #${number} with gh issue view`);
26455
26457
  process.exit(1);
@@ -26559,12 +26561,12 @@ function prepareIssueEdit(number, repo, fresh, proposed) {
26559
26561
  }
26560
26562
 
26561
26563
  // src/commands/github/issue/pushIssueBody.ts
26562
- import { execFileSync as execFileSync12 } from "child_process";
26564
+ import { execFileSync as execFileSync13 } from "child_process";
26563
26565
  function pushIssueBody(number, repo, bodyPath) {
26564
26566
  const args = ["issue", "edit", String(number), "--body-file", bodyPath];
26565
26567
  if (repo) args.push("--repo", repo);
26566
26568
  try {
26567
- execFileSync12("gh", args, { stdio: "inherit" });
26569
+ execFileSync13("gh", args, { stdio: "inherit" });
26568
26570
  } catch {
26569
26571
  process.exit(1);
26570
26572
  }
@@ -26643,12 +26645,12 @@ function setIssueParent(number, repo, parentArg) {
26643
26645
  }
26644
26646
 
26645
26647
  // src/commands/github/issue/viewIssue.ts
26646
- import { execFileSync as execFileSync13 } from "child_process";
26648
+ import { execFileSync as execFileSync14 } from "child_process";
26647
26649
  function viewIssue(number, repo) {
26648
26650
  const args = ["issue", "view", String(number)];
26649
26651
  if (repo) args.push("--repo", repo);
26650
26652
  try {
26651
- execFileSync13("gh", args, { stdio: "inherit" });
26653
+ execFileSync14("gh", args, { stdio: "inherit" });
26652
26654
  } catch {
26653
26655
  process.exit(1);
26654
26656
  }
@@ -26701,7 +26703,7 @@ function registerEditIssue(issueCommand) {
26701
26703
  }
26702
26704
 
26703
26705
  // src/commands/github/issue/editIssueComment.ts
26704
- import { execFileSync as execFileSync14 } from "child_process";
26706
+ import { execFileSync as execFileSync15 } from "child_process";
26705
26707
  var USAGE4 = "Usage: assist github issue edit-comment <comment-id> --body <body> [-R <owner>/<repo>]";
26706
26708
  async function editIssueComment(commentIdArg, options2) {
26707
26709
  const commentId = Number.parseInt(commentIdArg, 10);
@@ -26728,7 +26730,7 @@ async function editIssueComment(commentIdArg, options2) {
26728
26730
  ];
26729
26731
  let raw;
26730
26732
  try {
26731
- raw = execFileSync14("gh", args, {
26733
+ raw = execFileSync15("gh", args, {
26732
26734
  input: JSON.stringify({ body }),
26733
26735
  encoding: "utf8"
26734
26736
  });
@@ -27003,7 +27005,7 @@ function acceptanceCriteria(issueKey) {
27003
27005
  }
27004
27006
 
27005
27007
  // src/commands/jira/jiraAuth.ts
27006
- import { execSync as execSync39 } from "child_process";
27008
+ import { execSync as execSync38 } from "child_process";
27007
27009
 
27008
27010
  // src/shared/promptInput.ts
27009
27011
  import Enquirer from "enquirer";
@@ -27038,7 +27040,7 @@ async function jiraAuth() {
27038
27040
  console.error("All fields are required.");
27039
27041
  process.exit(1);
27040
27042
  }
27041
- execSync39(`acli jira auth login --site ${site} --email "${email}" --token`, {
27043
+ execSync38(`acli jira auth login --site ${site} --email "${email}" --token`, {
27042
27044
  encoding: "utf8",
27043
27045
  input: token,
27044
27046
  stdio: ["pipe", "inherit", "inherit"]
@@ -27109,7 +27111,7 @@ function registerRefineLaunch(program2, resumeFlag) {
27109
27111
  import { randomUUID as randomUUID12 } from "crypto";
27110
27112
 
27111
27113
  // src/commands/review/checkoutPr.ts
27112
- import { execFileSync as execFileSync17 } from "child_process";
27114
+ import { execFileSync as execFileSync18 } from "child_process";
27113
27115
  import chalk175 from "chalk";
27114
27116
 
27115
27117
  // src/commands/review/clearStalePrBranch.ts
@@ -27170,11 +27172,11 @@ import { existsSync as existsSync58 } from "fs";
27170
27172
  import { basename as basename20, dirname as dirname30 } from "path";
27171
27173
 
27172
27174
  // src/commands/watch/fetchQuietly.ts
27173
- import { execFileSync as execFileSync15 } from "child_process";
27175
+ import { execFileSync as execFileSync16 } from "child_process";
27174
27176
  var MIN_FETCH_TIMEOUT_MS = 6e4;
27175
27177
  function fetchQuietly(cwd, intervalMs) {
27176
27178
  try {
27177
- execFileSync15("git", ["fetch", "--quiet"], {
27179
+ execFileSync16("git", ["fetch", "--quiet"], {
27178
27180
  stdio: ["pipe", "pipe", "pipe"],
27179
27181
  cwd,
27180
27182
  timeout: Math.max(intervalMs, MIN_FETCH_TIMEOUT_MS)
@@ -27748,10 +27750,10 @@ async function moveToPrCheckoutTree() {
27748
27750
  }
27749
27751
 
27750
27752
  // src/commands/review/prHeadBranch.ts
27751
- import { execFileSync as execFileSync16 } from "child_process";
27753
+ import { execFileSync as execFileSync17 } from "child_process";
27752
27754
  function prHeadBranch(number) {
27753
27755
  try {
27754
- const out = execFileSync16(
27756
+ const out = execFileSync17(
27755
27757
  "gh",
27756
27758
  ["pr", "view", number, "--json", "headRefName", "-q", ".headRefName"],
27757
27759
  { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
@@ -27828,7 +27830,7 @@ async function checkoutPr(number) {
27828
27830
  const from = branch2 === "HEAD" ? gitSyncOrNull(process.cwd(), ["rev-parse", "HEAD"]) : branch2;
27829
27831
  const stale = headRef ? clearStalePrBranch(process.cwd(), headRef) : "absent";
27830
27832
  try {
27831
- execFileSync17("gh", ["pr", "checkout", number], { stdio: "inherit" });
27833
+ execFileSync18("gh", ["pr", "checkout", number], { stdio: "inherit" });
27832
27834
  } catch {
27833
27835
  failCheckout(number, headRef, stale, from);
27834
27836
  }
@@ -29474,7 +29476,7 @@ function registerPrompts(program2) {
29474
29476
  }
29475
29477
 
29476
29478
  // src/commands/prs/prs.ts
29477
- import { execSync as execSync40 } from "child_process";
29479
+ import { execSync as execSync39 } from "child_process";
29478
29480
 
29479
29481
  // src/commands/prs/prs/displayPaginated.ts
29480
29482
  import enquirer9 from "enquirer";
@@ -29581,7 +29583,7 @@ async function prs(options2) {
29581
29583
  const state = options2.open ? "open" : options2.closed ? "closed" : "all";
29582
29584
  try {
29583
29585
  const { org, repo } = getRepoInfo();
29584
- const result = execSync40(
29586
+ const result = execSync39(
29585
29587
  `gh pr list --state ${state} --json number,title,url,author,createdAt,mergedAt,closedAt,state,changedFiles --limit 100 -R ${org}/${repo}`,
29586
29588
  { encoding: "utf8" }
29587
29589
  );
@@ -29678,13 +29680,10 @@ async function comment2(path109, line, body, options2 = {}) {
29678
29680
  }
29679
29681
 
29680
29682
  // src/commands/prs/fixed.ts
29681
- import { execSync as execSync42 } from "child_process";
29683
+ import { execSync as execSync40 } from "child_process";
29682
29684
 
29683
29685
  // src/commands/prs/resolveCommentWithReply.ts
29684
- import { execSync as execSync41 } from "child_process";
29685
- import { unlinkSync as unlinkSync14, writeFileSync as writeFileSync36 } from "fs";
29686
- import { tmpdir as tmpdir6 } from "os";
29687
- import { join as join79 } from "path";
29686
+ import { execFileSync as execFileSync19 } from "child_process";
29688
29687
 
29689
29688
  // src/commands/prs/loadCommentsCache.ts
29690
29689
  import { existsSync as existsSync63, readFileSync as readFileSync45, unlinkSync as unlinkSync13 } from "fs";
@@ -29743,16 +29742,11 @@ function replyToComment(org, repo, prNumber, commentId, message3) {
29743
29742
  // src/commands/prs/resolveCommentWithReply.ts
29744
29743
  function resolveThread(threadId) {
29745
29744
  const mutation = `mutation($threadId: ID!) { resolveReviewThread(input: {threadId: $threadId}) { thread { isResolved } } }`;
29746
- const queryFile = join79(tmpdir6(), `gh-mutation-${Date.now()}.graphql`);
29747
- writeFileSync36(queryFile, mutation);
29748
- try {
29749
- execSync41(
29750
- `gh api graphql -F query=@${queryFile} -f threadId="${threadId}"`,
29751
- { stdio: ["inherit", "pipe", "inherit"] }
29752
- );
29753
- } finally {
29754
- unlinkSync14(queryFile);
29755
- }
29745
+ execFileSync19(
29746
+ "gh",
29747
+ ["api", "graphql", "-f", `query=${mutation}`, "-f", `threadId=${threadId}`],
29748
+ { stdio: ["inherit", "pipe", "inherit"] }
29749
+ );
29756
29750
  }
29757
29751
  function requireCache(org, repo, prNumber) {
29758
29752
  const cache6 = loadCommentsCache(org, repo, prNumber);
@@ -29798,7 +29792,7 @@ function resolveCommentWithReply(commentId, message3) {
29798
29792
  // src/commands/prs/fixed.ts
29799
29793
  function verifySha(sha) {
29800
29794
  try {
29801
- return execSync42(`git rev-parse --verify ${sha}`, {
29795
+ return execSync40(`git rev-parse --verify ${sha}`, {
29802
29796
  encoding: "utf8"
29803
29797
  }).trim();
29804
29798
  } catch {
@@ -29825,40 +29819,43 @@ function fixed(commentId, sha) {
29825
29819
  }
29826
29820
 
29827
29821
  // src/commands/prs/fetchThreadIds.ts
29828
- import { execSync as execSync43 } from "child_process";
29829
- import { unlinkSync as unlinkSync15, writeFileSync as writeFileSync37 } from "fs";
29830
- import { tmpdir as tmpdir7 } from "os";
29831
- import { join as join80 } from "path";
29822
+ import { execFileSync as execFileSync20 } from "child_process";
29832
29823
  var THREAD_QUERY = `query($owner: String!, $repo: String!, $prNumber: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $prNumber) { reviewThreads(first: 100) { nodes { id isResolved comments(first: 100) { nodes { databaseId } } } } } } }`;
29833
29824
  function fetchThreadIds(org, repo, prNumber) {
29834
- const queryFile = join80(tmpdir7(), `gh-query-${Date.now()}.graphql`);
29835
- writeFileSync37(queryFile, THREAD_QUERY);
29836
- try {
29837
- const result = execSync43(
29838
- `gh api graphql -F query=@${queryFile} -F owner="${org}" -F repo="${repo}" -F prNumber=${prNumber}`,
29839
- { encoding: "utf8" }
29840
- );
29841
- const response = JSON.parse(result);
29842
- const threadMap = /* @__PURE__ */ new Map();
29843
- const resolvedThreadIds = /* @__PURE__ */ new Set();
29844
- for (const thread of response.data.repository.pullRequest.reviewThreads.nodes) {
29845
- if (thread.isResolved) {
29846
- resolvedThreadIds.add(thread.id);
29847
- }
29848
- for (const comment3 of thread.comments.nodes) {
29849
- threadMap.set(comment3.databaseId, thread.id);
29850
- }
29825
+ const result = execFileSync20(
29826
+ "gh",
29827
+ [
29828
+ "api",
29829
+ "graphql",
29830
+ "-f",
29831
+ `query=${THREAD_QUERY}`,
29832
+ "-F",
29833
+ `owner=${org}`,
29834
+ "-F",
29835
+ `repo=${repo}`,
29836
+ "-F",
29837
+ `prNumber=${prNumber}`
29838
+ ],
29839
+ { encoding: "utf8" }
29840
+ );
29841
+ const response = JSON.parse(result);
29842
+ const threadMap = /* @__PURE__ */ new Map();
29843
+ const resolvedThreadIds = /* @__PURE__ */ new Set();
29844
+ for (const thread of response.data.repository.pullRequest.reviewThreads.nodes) {
29845
+ if (thread.isResolved) {
29846
+ resolvedThreadIds.add(thread.id);
29847
+ }
29848
+ for (const comment3 of thread.comments.nodes) {
29849
+ threadMap.set(comment3.databaseId, thread.id);
29851
29850
  }
29852
- return { threadMap, resolvedThreadIds };
29853
- } finally {
29854
- unlinkSync15(queryFile);
29855
29851
  }
29852
+ return { threadMap, resolvedThreadIds };
29856
29853
  }
29857
29854
 
29858
29855
  // src/commands/prs/listComments/fetchReviewComments.ts
29859
- import { execSync as execSync44 } from "child_process";
29856
+ import { execSync as execSync41 } from "child_process";
29860
29857
  function fetchJson(endpoint) {
29861
- const result = execSync44(`gh api --paginate ${endpoint}`, {
29858
+ const result = execSync41(`gh api --paginate ${endpoint}`, {
29862
29859
  encoding: "utf8"
29863
29860
  });
29864
29861
  if (!result.trim()) return [];
@@ -29900,16 +29897,16 @@ function fetchLineComments(org, repo, prNumber, threadInfo) {
29900
29897
  }
29901
29898
 
29902
29899
  // src/commands/prs/listComments/updateCommentsCache.ts
29903
- import { mkdirSync as mkdirSync21, writeFileSync as writeFileSync38 } from "fs";
29900
+ import { mkdirSync as mkdirSync21, writeFileSync as writeFileSync36 } from "fs";
29904
29901
  import { dirname as dirname35 } from "path";
29905
29902
  import { stringify as stringify3 } from "yaml";
29906
29903
 
29907
29904
  // src/commands/prs/removeStaleCommentsCaches.ts
29908
- import { readdirSync as readdirSync12, unlinkSync as unlinkSync16 } from "fs";
29909
- import { join as join81 } from "path";
29905
+ import { readdirSync as readdirSync12, unlinkSync as unlinkSync14 } from "fs";
29906
+ import { join as join79 } from "path";
29910
29907
  var STALE_PATTERN = /^pr-\d+-comments\.yaml$/;
29911
29908
  function removeStaleCommentsCaches(cwd = process.cwd()) {
29912
- const dir = join81(cwd, ".assist");
29909
+ const dir = join79(cwd, ".assist");
29913
29910
  let entries;
29914
29911
  try {
29915
29912
  entries = readdirSync12(dir);
@@ -29917,7 +29914,7 @@ function removeStaleCommentsCaches(cwd = process.cwd()) {
29917
29914
  return;
29918
29915
  }
29919
29916
  for (const entry of entries.filter((e) => STALE_PATTERN.test(e))) {
29920
- unlinkSync16(join81(dir, entry));
29917
+ unlinkSync14(join79(dir, entry));
29921
29918
  }
29922
29919
  }
29923
29920
 
@@ -29930,7 +29927,7 @@ function writeCommentsCache(org, repo, prNumber, comments3) {
29930
29927
  fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
29931
29928
  comments: comments3
29932
29929
  };
29933
- writeFileSync38(cachePath, stringify3(cacheData));
29930
+ writeFileSync36(cachePath, stringify3(cacheData));
29934
29931
  }
29935
29932
  function updateCommentsCache(org, repo, prNumber, comments3) {
29936
29933
  removeStaleCommentsCaches();
@@ -30168,7 +30165,7 @@ async function reply(commentId, body) {
30168
30165
  }
30169
30166
 
30170
30167
  // src/commands/prs/wontfix.ts
30171
- import { execSync as execSync45 } from "child_process";
30168
+ import { execSync as execSync42 } from "child_process";
30172
30169
  function validateReason(reason4) {
30173
30170
  const lowerReason = reason4.toLowerCase();
30174
30171
  if (lowerReason.includes("claude") || lowerReason.includes("opus")) {
@@ -30185,7 +30182,7 @@ function validateShaReferences(reason4) {
30185
30182
  const invalidShas = [];
30186
30183
  for (const sha of shas) {
30187
30184
  try {
30188
- execSync45(`git cat-file -t ${sha}`, { stdio: "pipe" });
30185
+ execSync42(`git cat-file -t ${sha}`, { stdio: "pipe" });
30189
30186
  } catch {
30190
30187
  invalidShas.push(sha);
30191
30188
  }
@@ -30648,7 +30645,7 @@ function buildValidatedBody(options2, usage) {
30648
30645
  }
30649
30646
 
30650
30647
  // src/commands/prs/placePr.ts
30651
- import { execFileSync as execFileSync18 } from "child_process";
30648
+ import { execFileSync as execFileSync21 } from "child_process";
30652
30649
 
30653
30650
  // src/commands/prs/buildCreateArgs.ts
30654
30651
  function buildCreateArgs(title, body, options2, attachments = []) {
@@ -30685,16 +30682,16 @@ function buildCreateArgs(title, body, options2, attachments = []) {
30685
30682
  }
30686
30683
 
30687
30684
  // src/commands/prs/readSessionPrRef.ts
30688
- import { execSync as execSync46 } from "child_process";
30685
+ import { execSync as execSync43 } from "child_process";
30689
30686
  function readSessionPrRef() {
30690
30687
  try {
30691
- const branch2 = execSync46("git rev-parse --abbrev-ref HEAD", {
30688
+ const branch2 = execSync43("git rev-parse --abbrev-ref HEAD", {
30692
30689
  encoding: "utf8",
30693
30690
  stdio: ["pipe", "pipe", "pipe"]
30694
30691
  }).trim();
30695
30692
  if (!branch2 || branch2 === "HEAD") return null;
30696
30693
  const pr = JSON.parse(
30697
- execSync46(`gh pr view ${branch2} --json number,title,url,state`, {
30694
+ execSync43(`gh pr view ${branch2} --json number,title,url,state`, {
30698
30695
  encoding: "utf8",
30699
30696
  stdio: ["pipe", "pipe", "pipe"]
30700
30697
  })
@@ -30734,7 +30731,7 @@ function buildEditArgs(number, title, body, attachments = []) {
30734
30731
  // src/commands/prs/placePr.ts
30735
30732
  function hasUpstream2() {
30736
30733
  try {
30737
- execFileSync18(
30734
+ execFileSync21(
30738
30735
  "git",
30739
30736
  ["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"],
30740
30737
  { stdio: "pipe" }
@@ -30746,7 +30743,7 @@ function hasUpstream2() {
30746
30743
  }
30747
30744
  function ensureBranchPushed() {
30748
30745
  const args = hasUpstream2() ? ["push"] : ["push", "--set-upstream", "origin", "HEAD"];
30749
- execFileSync18("git", args, { stdio: "inherit" });
30746
+ execFileSync21("git", args, { stdio: "inherit" });
30750
30747
  }
30751
30748
  async function placePr(prNumber, title, body, options2, attachments = []) {
30752
30749
  const args = prNumber !== null ? buildEditArgs(prNumber, title, body, attachments) : buildCreateArgs(title, body, options2, attachments);
@@ -30817,10 +30814,10 @@ function warn(reason4) {
30817
30814
  }
30818
30815
 
30819
30816
  // src/commands/prs/enableAutoMerge.ts
30820
- import { execFileSync as execFileSync19 } from "child_process";
30817
+ import { execFileSync as execFileSync22 } from "child_process";
30821
30818
  function enableAutoMerge() {
30822
30819
  try {
30823
- execFileSync19(
30820
+ execFileSync22(
30824
30821
  "gh",
30825
30822
  ["pr", "merge", getCurrentBranch2(), "--auto", "--squash"],
30826
30823
  { stdio: "inherit" }
@@ -31066,11 +31063,23 @@ function prsSlackChannel() {
31066
31063
  }
31067
31064
 
31068
31065
  // src/commands/prs/status/fetchReviewThreads.ts
31069
- import { execSync as execSync47 } from "child_process";
31066
+ import { execFileSync as execFileSync23 } from "child_process";
31070
31067
  var THREAD_QUERY2 = `query($owner: String!, $repo: String!, $prNumber: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $prNumber) { reviewThreads(first: 100) { nodes { isResolved } } } } }`;
31071
31068
  function fetchReviewThreads(org, repo, prNumber) {
31072
- const output = execSync47(
31073
- `gh api graphql -f query='${THREAD_QUERY2}' -F owner=${org} -F repo=${repo} -F prNumber=${prNumber}`,
31069
+ const output = execFileSync23(
31070
+ "gh",
31071
+ [
31072
+ "api",
31073
+ "graphql",
31074
+ "-f",
31075
+ `query=${THREAD_QUERY2}`,
31076
+ "-F",
31077
+ `owner=${org}`,
31078
+ "-F",
31079
+ `repo=${repo}`,
31080
+ "-F",
31081
+ `prNumber=${prNumber}`
31082
+ ],
31074
31083
  { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
31075
31084
  );
31076
31085
  const nodes = JSON.parse(output)?.data?.repository?.pullRequest?.reviewThreads?.nodes;
@@ -31115,10 +31124,10 @@ function describeFetchError(error) {
31115
31124
  }
31116
31125
 
31117
31126
  // src/commands/prs/status/fetchRepoPullRequests.ts
31118
- import { execSync as execSync48 } from "child_process";
31127
+ import { execSync as execSync44 } from "child_process";
31119
31128
  var FIELDS2 = "number,title,url,author,isDraft,createdAt,updatedAt,reviewDecision,latestReviews,statusCheckRollup,mergeable";
31120
31129
  function fetchRepoPullRequests(org, repo) {
31121
- const output = execSync48(
31130
+ const output = execSync44(
31122
31131
  `gh pr list --state open --json ${FIELDS2} --limit 100 -R ${org}/${repo}`,
31123
31132
  { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
31124
31133
  );
@@ -31461,7 +31470,7 @@ function resolveReadTimeTarget(target) {
31461
31470
  }
31462
31471
 
31463
31472
  // src/commands/prs/fetchPrBody.ts
31464
- import { execSync as execSync49 } from "child_process";
31473
+ import { execSync as execSync45 } from "child_process";
31465
31474
  function exitGhNotInstalled() {
31466
31475
  console.error("Error: GitHub CLI (gh) is not installed.");
31467
31476
  console.error("Install it from https://cli.github.com/");
@@ -31482,7 +31491,7 @@ function currentRepo() {
31482
31491
  function fetchPrBody(number, repo) {
31483
31492
  const { org, repo: name } = repo ?? currentRepo();
31484
31493
  try {
31485
- const raw = execSync49(`gh pr view ${number} --json body -R ${org}/${name}`, {
31494
+ const raw = execSync45(`gh pr view ${number} --json body -R ${org}/${name}`, {
31486
31495
  encoding: "utf8",
31487
31496
  stdio: ["pipe", "pipe", "pipe"]
31488
31497
  });
@@ -31638,10 +31647,10 @@ import chalk194 from "chalk";
31638
31647
  import Enquirer2 from "enquirer";
31639
31648
 
31640
31649
  // src/commands/ravendb/searchItems.ts
31641
- import { execSync as execSync50 } from "child_process";
31650
+ import { execSync as execSync46 } from "child_process";
31642
31651
  import chalk193 from "chalk";
31643
31652
  function opExec(args) {
31644
- return execSync50(`op ${args}`, {
31653
+ return execSync46(`op ${args}`, {
31645
31654
  encoding: "utf8",
31646
31655
  stdio: ["pipe", "pipe", "pipe"]
31647
31656
  }).trim();
@@ -31793,7 +31802,7 @@ ${errorText}`
31793
31802
  }
31794
31803
 
31795
31804
  // src/commands/ravendb/resolveOpSecret.ts
31796
- import { execSync as execSync51 } from "child_process";
31805
+ import { execSync as execSync47 } from "child_process";
31797
31806
  import chalk198 from "chalk";
31798
31807
  function resolveOpSecret(reference) {
31799
31808
  if (!reference.startsWith("op://")) {
@@ -31801,7 +31810,7 @@ function resolveOpSecret(reference) {
31801
31810
  process.exit(1);
31802
31811
  }
31803
31812
  try {
31804
- return execSync51(`op read "${reference}"`, {
31813
+ return execSync47(`op read "${reference}"`, {
31805
31814
  encoding: "utf8",
31806
31815
  stdio: ["pipe", "pipe", "pipe"]
31807
31816
  }).trim();
@@ -32239,9 +32248,9 @@ function registerReleases(parent) {
32239
32248
  }
32240
32249
 
32241
32250
  // src/commands/coverage.ts
32242
- import { execSync as execSync52 } from "child_process";
32251
+ import { execSync as execSync48 } from "child_process";
32243
32252
  function coverage() {
32244
- const output = execSync52(
32253
+ const output = execSync48(
32245
32254
  "npx vitest run --coverage --coverage.include='src/**/*.ts' --coverage.all --coverage.reporter=text 2>&1",
32246
32255
  { encoding: "utf8", timeout: 12e4 }
32247
32256
  );
@@ -32604,10 +32613,10 @@ async function notify() {
32604
32613
  }
32605
32614
 
32606
32615
  // src/commands/screenshot.ts
32607
- import { execSync as execSync53 } from "child_process";
32608
- import { existsSync as existsSync64, mkdirSync as mkdirSync22, unlinkSync as unlinkSync17, writeFileSync as writeFileSync39 } from "fs";
32609
- import { tmpdir as tmpdir8 } from "os";
32610
- import { join as join82, resolve as resolve24 } from "path";
32616
+ import { execSync as execSync49 } from "child_process";
32617
+ import { existsSync as existsSync64, mkdirSync as mkdirSync22, unlinkSync as unlinkSync15, writeFileSync as writeFileSync37 } from "fs";
32618
+ import { tmpdir as tmpdir6 } from "os";
32619
+ import { join as join80, resolve as resolve24 } from "path";
32611
32620
  import chalk210 from "chalk";
32612
32621
 
32613
32622
  // src/commands/screenshot/captureWindowPs1.ts
@@ -32744,15 +32753,15 @@ function buildOutputPath(outputDir, processName) {
32744
32753
  return resolve24(outputDir, `${processName}-${timestamp6}.png`);
32745
32754
  }
32746
32755
  function runPowerShellScript(processName, outputPath) {
32747
- const scriptPath = join82(tmpdir8(), `assist-screenshot-${Date.now()}.ps1`);
32748
- writeFileSync39(scriptPath, captureWindowPs1, "utf8");
32756
+ const scriptPath = join80(tmpdir6(), `assist-screenshot-${Date.now()}.ps1`);
32757
+ writeFileSync37(scriptPath, captureWindowPs1, "utf8");
32749
32758
  try {
32750
- execSync53(
32759
+ execSync49(
32751
32760
  `powershell -NoProfile -ExecutionPolicy Bypass -File "${scriptPath}" -ProcessName "${processName}" -OutputPath "${outputPath}"`,
32752
32761
  { stdio: ["ignore", "pipe", "pipe"], encoding: "utf8" }
32753
32762
  );
32754
32763
  } finally {
32755
- unlinkSync17(scriptPath);
32764
+ unlinkSync15(scriptPath);
32756
32765
  }
32757
32766
  }
32758
32767
  function screenshot(processName) {
@@ -32859,9 +32868,9 @@ function buildLimitsSegment(rateLimits) {
32859
32868
 
32860
32869
  // src/commands/readGitBranch.ts
32861
32870
  import { readFileSync as readFileSync48, statSync as statSync11 } from "fs";
32862
- import { isAbsolute as isAbsolute6, join as join83, resolve as resolve25 } from "path";
32871
+ import { isAbsolute as isAbsolute6, join as join81, resolve as resolve25 } from "path";
32863
32872
  function resolveGitDir(cwd) {
32864
- const dotGit = join83(cwd, ".git");
32873
+ const dotGit = join81(cwd, ".git");
32865
32874
  let stat5;
32866
32875
  try {
32867
32876
  stat5 = statSync11(dotGit);
@@ -32891,7 +32900,7 @@ function readGitBranch(cwd) {
32891
32900
  }
32892
32901
  let head;
32893
32902
  try {
32894
- head = readFileSync48(join83(gitDir, "HEAD"), "utf8");
32903
+ head = readFileSync48(join81(gitDir, "HEAD"), "utf8");
32895
32904
  } catch {
32896
32905
  return null;
32897
32906
  }
@@ -32959,7 +32968,7 @@ async function statusLine() {
32959
32968
  }
32960
32969
 
32961
32970
  // src/commands/update.ts
32962
- import { execSync as execSync54 } from "child_process";
32971
+ import { execSync as execSync50 } from "child_process";
32963
32972
  import * as path47 from "path";
32964
32973
 
32965
32974
  // src/commands/restartDaemonAfterUpdate.ts
@@ -32983,7 +32992,7 @@ function isGlobalNpmInstall(dir) {
32983
32992
  if (resolved.split(path47.sep).includes("node_modules")) {
32984
32993
  return true;
32985
32994
  }
32986
- const globalPrefix = execSync54("npm prefix -g", { stdio: "pipe" }).toString().trim();
32995
+ const globalPrefix = execSync50("npm prefix -g", { stdio: "pipe" }).toString().trim();
32987
32996
  return resolved.toLowerCase().startsWith(path47.resolve(globalPrefix).toLowerCase());
32988
32997
  } catch {
32989
32998
  return false;
@@ -32994,18 +33003,18 @@ async function update2() {
32994
33003
  console.log(`Assist is installed at: ${installDir}`);
32995
33004
  if (isGitRepo(installDir)) {
32996
33005
  console.log("Detected git repo installation, pulling latest...");
32997
- execSync54("git pull", { cwd: installDir, stdio: "inherit" });
33006
+ execSync50("git pull", { cwd: installDir, stdio: "inherit" });
32998
33007
  console.log("Installing dependencies...");
32999
- execSync54("npm i", { cwd: installDir, stdio: "inherit" });
33008
+ execSync50("npm i", { cwd: installDir, stdio: "inherit" });
33000
33009
  console.log("Building...");
33001
- execSync54("npm run build", { cwd: installDir, stdio: "inherit" });
33010
+ execSync50("npm run build", { cwd: installDir, stdio: "inherit" });
33002
33011
  console.log("Syncing commands...");
33003
- execSync54("assist sync", { stdio: "inherit" });
33012
+ execSync50("assist sync", { stdio: "inherit" });
33004
33013
  } else if (isGlobalNpmInstall(installDir)) {
33005
33014
  console.log("Detected global npm installation, updating...");
33006
- execSync54("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
33015
+ execSync50("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
33007
33016
  console.log("Syncing commands...");
33008
- execSync54("assist sync", { stdio: "inherit" });
33017
+ execSync50("assist sync", { stdio: "inherit" });
33009
33018
  } else {
33010
33019
  console.error(
33011
33020
  "Could not determine installation method. Expected a git repo or global npm install."
@@ -33104,7 +33113,7 @@ Refactor check failed:
33104
33113
  }
33105
33114
 
33106
33115
  // src/commands/refactor/check/getViolations.ts
33107
- import { execSync as execSync55 } from "child_process";
33116
+ import { execSync as execSync51 } from "child_process";
33108
33117
  import fs30 from "fs";
33109
33118
  import { minimatch as minimatch3 } from "minimatch";
33110
33119
 
@@ -33154,7 +33163,7 @@ function getGitFiles(options2) {
33154
33163
  }
33155
33164
  const files = /* @__PURE__ */ new Set();
33156
33165
  if (options2.staged || options2.modified) {
33157
- const staged = execSync55("git diff --cached --name-only", {
33166
+ const staged = execSync51("git diff --cached --name-only", {
33158
33167
  encoding: "utf8"
33159
33168
  });
33160
33169
  for (const file of staged.trim().split("\n").filter(Boolean)) {
@@ -33162,7 +33171,7 @@ function getGitFiles(options2) {
33162
33171
  }
33163
33172
  }
33164
33173
  if (options2.unstaged || options2.modified) {
33165
- const unstaged = execSync55("git diff --name-only", { encoding: "utf8" });
33174
+ const unstaged = execSync51("git diff --name-only", { encoding: "utf8" });
33166
33175
  for (const file of unstaged.trim().split("\n").filter(Boolean)) {
33167
33176
  files.add(file);
33168
33177
  }
@@ -35350,7 +35359,7 @@ function exitWith(message3) {
35350
35359
  }
35351
35360
 
35352
35361
  // src/commands/review/highLevel/proposeHighLevelGlobs.ts
35353
- import { execFileSync as execFileSync21 } from "child_process";
35362
+ import { execFileSync as execFileSync25 } from "child_process";
35354
35363
  import chalk234 from "chalk";
35355
35364
 
35356
35365
  // src/commands/review/highLevel/buildGlobProposalPrompt.ts
@@ -35398,7 +35407,7 @@ function readGlobs(value) {
35398
35407
  }
35399
35408
 
35400
35409
  // src/commands/review/highLevel/summariseRepoTree.ts
35401
- import { execFileSync as execFileSync20 } from "child_process";
35410
+ import { execFileSync as execFileSync24 } from "child_process";
35402
35411
  import { dirname as dirname37, extname as extname6 } from "path";
35403
35412
  var MAX_DIRECTORIES = 200;
35404
35413
  var MAX_EXTENSIONS_PER_DIRECTORY = 6;
@@ -35414,7 +35423,7 @@ function summariseRepoTree(cwd = process.cwd()) {
35414
35423
  }
35415
35424
  function listTrackedFiles(cwd) {
35416
35425
  try {
35417
- return execFileSync20("git", ["ls-files"], {
35426
+ return execFileSync24("git", ["ls-files"], {
35418
35427
  cwd,
35419
35428
  encoding: "utf8",
35420
35429
  maxBuffer: 64 * 1024 * 1024
@@ -35459,7 +35468,7 @@ function proposeHighLevelGlobs(cwd = process.cwd()) {
35459
35468
  }
35460
35469
  function askClaude(prompt, cwd) {
35461
35470
  try {
35462
- return execFileSync21("claude", ["-p", "--model", "sonnet", prompt], {
35471
+ return execFileSync25("claude", ["-p", "--model", "sonnet", prompt], {
35463
35472
  cwd,
35464
35473
  encoding: "utf8",
35465
35474
  timeout: 12e4,
@@ -35701,7 +35710,7 @@ function capHighLevelTestSources(files) {
35701
35710
 
35702
35711
  // src/commands/review/highLevel/collectHighLevelTests.ts
35703
35712
  import { existsSync as existsSync65, readFileSync as readFileSync49 } from "fs";
35704
- import { join as join84 } from "path";
35713
+ import { join as join82 } from "path";
35705
35714
  import { minimatch as minimatch6 } from "minimatch";
35706
35715
 
35707
35716
  // src/commands/review/highLevel/extractTestHierarchy.ts
@@ -35824,7 +35833,7 @@ function patchAddedLines(patch2) {
35824
35833
 
35825
35834
  // src/commands/review/highLevel/collectHighLevelTests.ts
35826
35835
  function testFile(file, repoRoot2) {
35827
- const absolute2 = join84(repoRoot2, file.path);
35836
+ const absolute2 = join82(repoRoot2, file.path);
35828
35837
  if (!existsSync65(absolute2)) return [];
35829
35838
  const changed = file.patch === void 0 ? void 0 : patchAddedLines(file.patch);
35830
35839
  const tests = extractTestHierarchy(
@@ -36019,7 +36028,7 @@ function evaluateHighLevelChecks(subject) {
36019
36028
  }
36020
36029
 
36021
36030
  // src/commands/review/highLevel/fetchHighLevelFiles.ts
36022
- import { execSync as execSync56 } from "child_process";
36031
+ import { execFileSync as execFileSync26 } from "child_process";
36023
36032
  import { createHash as createHash4 } from "crypto";
36024
36033
  var JQ = ".[] | {filename,status,additions,deletions,patch} | @json";
36025
36034
  function toStatus(status2) {
@@ -36032,8 +36041,9 @@ function diffUrl(repo, prNumber, path109) {
36032
36041
  return `https://github.com/${repo}/pull/${prNumber}/files#diff-${anchor}`;
36033
36042
  }
36034
36043
  function fetchHighLevelFiles(prNumber, repo) {
36035
- const out = execSync56(
36036
- `gh api repos/${repo}/pulls/${prNumber}/files --paginate --jq '${JQ}'`,
36044
+ const out = execFileSync26(
36045
+ "gh",
36046
+ ["api", `repos/${repo}/pulls/${prNumber}/files`, "--paginate", "--jq", JQ],
36037
36047
  { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }
36038
36048
  );
36039
36049
  return out.trim().split("\n").filter(Boolean).map((line) => {
@@ -36050,9 +36060,9 @@ function fetchHighLevelFiles(prNumber, repo) {
36050
36060
  }
36051
36061
 
36052
36062
  // src/commands/review/highLevel/fetchHighLevelPr.ts
36053
- import { execSync as execSync57 } from "child_process";
36063
+ import { execSync as execSync52 } from "child_process";
36054
36064
  function fetchHighLevelPr(prNumber, repo) {
36055
- const raw = execSync57(
36065
+ const raw = execSync52(
36056
36066
  `gh pr view ${prNumber} --json title,body,headRefName,headRefOid,closingIssuesReferences -R ${repo.org}/${repo.repo}`,
36057
36067
  { encoding: "utf8" }
36058
36068
  );
@@ -36072,12 +36082,12 @@ function fetchHighLevelPr(prNumber, repo) {
36072
36082
  import { existsSync as existsSync66, readFileSync as readFileSync50 } from "fs";
36073
36083
 
36074
36084
  // src/commands/review/highLevel/highLevelReviewPath.ts
36075
- import { join as join85 } from "path";
36085
+ import { join as join83 } from "path";
36076
36086
  function slug(value) {
36077
36087
  return value.replace(/[^\w.-]+/g, "-");
36078
36088
  }
36079
36089
  function highLevelReviewPath(repo, headRef, headSha) {
36080
- return join85(
36090
+ return join83(
36081
36091
  getStoreDir(),
36082
36092
  "high-level-reviews",
36083
36093
  slug(repo),
@@ -36294,12 +36304,12 @@ function postHighLevelApproval(repo, prNumber, body) {
36294
36304
  }
36295
36305
 
36296
36306
  // src/commands/review/highLevel/saveHighLevelReview.ts
36297
- import { mkdirSync as mkdirSync23, writeFileSync as writeFileSync40 } from "fs";
36307
+ import { mkdirSync as mkdirSync23, writeFileSync as writeFileSync38 } from "fs";
36298
36308
  import { dirname as dirname38 } from "path";
36299
36309
  function saveHighLevelReview(record) {
36300
36310
  const path109 = highLevelReviewPath(record.repo, record.headRef, record.headSha);
36301
36311
  mkdirSync23(dirname38(path109), { recursive: true });
36302
- writeFileSync40(path109, `${JSON.stringify(record, null, 2)}
36312
+ writeFileSync38(path109, `${JSON.stringify(record, null, 2)}
36303
36313
  `);
36304
36314
  return path109;
36305
36315
  }
@@ -36732,11 +36742,11 @@ function buildDiffLineIndex(diff3) {
36732
36742
  }
36733
36743
 
36734
36744
  // src/commands/review/fetchPrDiff.ts
36735
- import { execSync as execSync58 } from "child_process";
36745
+ import { execSync as execSync53 } from "child_process";
36736
36746
  function fetchPrDiff(prNumber, baseSha, headSha) {
36737
36747
  const { org, repo } = getRepoInfo();
36738
36748
  try {
36739
- return execSync58(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
36749
+ return execSync53(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
36740
36750
  encoding: "utf8",
36741
36751
  maxBuffer: 256 * 1024 * 1024,
36742
36752
  stdio: ["ignore", "pipe", "pipe"]
@@ -36751,10 +36761,10 @@ function isDiffTooLarge(error) {
36751
36761
  }
36752
36762
  function fetchDiffViaGit(baseSha, headSha) {
36753
36763
  try {
36754
- execSync58(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
36764
+ execSync53(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
36755
36765
  } catch {
36756
36766
  }
36757
- return execSync58(`git diff ${baseSha}...${headSha}`, {
36767
+ return execSync53(`git diff ${baseSha}...${headSha}`, {
36758
36768
  encoding: "utf8",
36759
36769
  maxBuffer: 256 * 1024 * 1024
36760
36770
  });
@@ -37027,7 +37037,7 @@ import { format as format2 } from "util";
37027
37037
 
37028
37038
  // src/commands/review/createReviewLogSink.ts
37029
37039
  import { appendFileSync as appendFileSync3, mkdirSync as mkdirSync24 } from "fs";
37030
- import { join as join86 } from "path";
37040
+ import { join as join84 } from "path";
37031
37041
  var LOG_FILE = "review.log";
37032
37042
  function createReviewLogSink() {
37033
37043
  let logPath2;
@@ -37044,7 +37054,7 @@ function createReviewLogSink() {
37044
37054
  },
37045
37055
  attach(reviewDir) {
37046
37056
  mkdirSync24(reviewDir, { recursive: true });
37047
- logPath2 = join86(reviewDir, LOG_FILE);
37057
+ logPath2 = join84(reviewDir, LOG_FILE);
37048
37058
  const lines2 = [
37049
37059
  "",
37050
37060
  `=== ${(/* @__PURE__ */ new Date()).toISOString()} ===`,
@@ -37294,7 +37304,7 @@ function buildCodexModelArgs() {
37294
37304
  }
37295
37305
 
37296
37306
  // src/commands/review/runClaudeReviewer.ts
37297
- import { writeFileSync as writeFileSync41 } from "fs";
37307
+ import { writeFileSync as writeFileSync39 } from "fs";
37298
37308
 
37299
37309
  // src/commands/review/formatToolSummary.ts
37300
37310
  function truncate2(value, max = 80) {
@@ -37733,7 +37743,7 @@ async function runClaudeReviewer(spec) {
37733
37743
  onLine
37734
37744
  });
37735
37745
  if (result.exitCode === 0 && state.finalText)
37736
- writeFileSync41(spec.outputPath, state.finalText);
37746
+ writeFileSync39(spec.outputPath, state.finalText);
37737
37747
  const finalised = finaliseReviewerRun(
37738
37748
  { ...spec, command, model: override?.model },
37739
37749
  spinner,
@@ -37743,7 +37753,7 @@ async function runClaudeReviewer(spec) {
37743
37753
  }
37744
37754
 
37745
37755
  // src/commands/review/runCodexReviewer.ts
37746
- import { existsSync as existsSync67, unlinkSync as unlinkSync18 } from "fs";
37756
+ import { existsSync as existsSync67, unlinkSync as unlinkSync16 } from "fs";
37747
37757
 
37748
37758
  // src/commands/review/parseCodexUsage.ts
37749
37759
  function parseCodexUsage(usage) {
@@ -37833,7 +37843,7 @@ async function runCodexReviewer(spec) {
37833
37843
  onLine
37834
37844
  });
37835
37845
  if (result.exitCode !== 0 && existsSync67(spec.outputPath)) {
37836
- unlinkSync18(spec.outputPath);
37846
+ unlinkSync16(spec.outputPath);
37837
37847
  }
37838
37848
  const finalised = finaliseReviewerRun(
37839
37849
  {
@@ -37923,7 +37933,7 @@ async function runReviewers(reviewDir, claudePath, codexPath, stdinPrompt, optio
37923
37933
  }
37924
37934
 
37925
37935
  // src/commands/review/synthesiseAfterReviewers.ts
37926
- import { existsSync as existsSync68, unlinkSync as unlinkSync19 } from "fs";
37936
+ import { existsSync as existsSync68, unlinkSync as unlinkSync17 } from "fs";
37927
37937
 
37928
37938
  // src/commands/review/synthesise.ts
37929
37939
  import { readFileSync as readFileSync52 } from "fs";
@@ -38031,7 +38041,7 @@ async function synthesise(paths, options2) {
38031
38041
  async function synthesiseAfterReviewers(input) {
38032
38042
  const { paths, failures } = input;
38033
38043
  if (input.anyFresh && existsSync68(paths.synthesisPath)) {
38034
- unlinkSync19(paths.synthesisPath);
38044
+ unlinkSync17(paths.synthesisPath);
38035
38045
  }
38036
38046
  const synthesisResult = await synthesise(paths, {
38037
38047
  multi: input.multi,
@@ -38259,9 +38269,9 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
38259
38269
 
38260
38270
  // src/commands/review/buildReviewPaths.ts
38261
38271
  import { homedir as homedir25 } from "os";
38262
- import { basename as basename25, join as join87 } from "path";
38272
+ import { basename as basename25, join as join85 } from "path";
38263
38273
  function buildReviewPaths(repoRoot2, key) {
38264
- const reviewDir = join87(
38274
+ const reviewDir = join85(
38265
38275
  homedir25(),
38266
38276
  ".assist",
38267
38277
  "reviews",
@@ -38270,17 +38280,17 @@ function buildReviewPaths(repoRoot2, key) {
38270
38280
  );
38271
38281
  return {
38272
38282
  reviewDir,
38273
- requestPath: join87(reviewDir, "request.md"),
38274
- claudePath: join87(reviewDir, "claude.md"),
38275
- codexPath: join87(reviewDir, "codex.md"),
38276
- synthesisPath: join87(reviewDir, "synthesis.md")
38283
+ requestPath: join85(reviewDir, "request.md"),
38284
+ claudePath: join85(reviewDir, "claude.md"),
38285
+ codexPath: join85(reviewDir, "codex.md"),
38286
+ synthesisPath: join85(reviewDir, "synthesis.md")
38277
38287
  };
38278
38288
  }
38279
38289
 
38280
38290
  // src/commands/review/fetchExistingComments.ts
38281
- import { execSync as execSync59 } from "child_process";
38291
+ import { execSync as execSync54 } from "child_process";
38282
38292
  function fetchRawComments(org, repo, prNumber) {
38283
- const out = execSync59(
38293
+ const out = execSync54(
38284
38294
  `gh api --paginate repos/${org}/${repo}/pulls/${prNumber}/comments`,
38285
38295
  { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }
38286
38296
  );
@@ -38311,16 +38321,16 @@ function fetchExistingComments() {
38311
38321
  }
38312
38322
 
38313
38323
  // src/commands/review/prepareReviewDir.ts
38314
- import { existsSync as existsSync69, mkdirSync as mkdirSync25, unlinkSync as unlinkSync20, writeFileSync as writeFileSync42 } from "fs";
38324
+ import { existsSync as existsSync69, mkdirSync as mkdirSync25, unlinkSync as unlinkSync18, writeFileSync as writeFileSync40 } from "fs";
38315
38325
  function clearReviewFiles(paths) {
38316
38326
  for (const path109 of [paths.claudePath, paths.codexPath, paths.synthesisPath]) {
38317
- if (existsSync69(path109)) unlinkSync20(path109);
38327
+ if (existsSync69(path109)) unlinkSync18(path109);
38318
38328
  }
38319
38329
  }
38320
38330
  function prepareReviewDir(paths, requestBody, force) {
38321
38331
  mkdirSync25(paths.reviewDir, { recursive: true });
38322
38332
  if (force) clearReviewFiles(paths);
38323
- writeFileSync42(paths.requestPath, requestBody);
38333
+ writeFileSync40(paths.requestPath, requestBody);
38324
38334
  }
38325
38335
 
38326
38336
  // src/commands/review/setupReviewDir.ts
@@ -38341,18 +38351,18 @@ function logPriorComments(count9) {
38341
38351
  }
38342
38352
 
38343
38353
  // src/commands/review/gatherContext.ts
38344
- import { execSync as execSync61 } from "child_process";
38354
+ import { execSync as execSync56 } from "child_process";
38345
38355
 
38346
38356
  // src/commands/review/fetchPrDiffInfo.ts
38347
- import { execSync as execSync60 } from "child_process";
38357
+ import { execSync as execSync55 } from "child_process";
38348
38358
  function getCurrentBranch3() {
38349
- return execSync60("git rev-parse --abbrev-ref HEAD", {
38359
+ return execSync55("git rev-parse --abbrev-ref HEAD", {
38350
38360
  encoding: "utf8"
38351
38361
  }).trim();
38352
38362
  }
38353
38363
  var FIELDS3 = "number,baseRefName,baseRefOid,headRefName,headRefOid";
38354
38364
  function runGh2(command) {
38355
- return execSync60(command, {
38365
+ return execSync55(command, {
38356
38366
  encoding: "utf8",
38357
38367
  stdio: ["ignore", "pipe", "pipe"]
38358
38368
  });
@@ -38390,7 +38400,7 @@ function fetchPrDiffInfo() {
38390
38400
  }
38391
38401
  function fetchPrChangedFiles(prNumber) {
38392
38402
  const { org, repo } = getRepoInfo();
38393
- const out = execSync60(
38403
+ const out = execSync55(
38394
38404
  `gh api repos/${org}/${repo}/pulls/${prNumber}/files --paginate --jq ".[].filename"`,
38395
38405
  {
38396
38406
  encoding: "utf8",
@@ -38402,11 +38412,11 @@ function fetchPrChangedFiles(prNumber) {
38402
38412
 
38403
38413
  // src/commands/review/gatherContext.ts
38404
38414
  function gatherContext() {
38405
- const branch2 = execSync61("git rev-parse --abbrev-ref HEAD", {
38415
+ const branch2 = execSync56("git rev-parse --abbrev-ref HEAD", {
38406
38416
  encoding: "utf8"
38407
38417
  }).trim();
38408
- const sha = execSync61("git rev-parse HEAD", { encoding: "utf8" }).trim();
38409
- const shortSha = execSync61("git rev-parse --short=7 HEAD", {
38418
+ const sha = execSync56("git rev-parse HEAD", { encoding: "utf8" }).trim();
38419
+ const shortSha = execSync56("git rev-parse --short=7 HEAD", {
38410
38420
  encoding: "utf8"
38411
38421
  }).trim();
38412
38422
  const prInfo = fetchPrDiffInfo();
@@ -38947,7 +38957,7 @@ function registerReview(program2) {
38947
38957
  }
38948
38958
 
38949
38959
  // src/commands/rules/addRule.ts
38950
- import { existsSync as existsSync72, readFileSync as readFileSync57, writeFileSync as writeFileSync44 } from "fs";
38960
+ import { existsSync as existsSync72, readFileSync as readFileSync57, writeFileSync as writeFileSync42 } from "fs";
38951
38961
  import path88 from "path";
38952
38962
  import chalk244 from "chalk";
38953
38963
 
@@ -39022,7 +39032,7 @@ function resolveRuleScope(target) {
39022
39032
  }
39023
39033
 
39024
39034
  // src/commands/rules/updateScopedRulesIndex.ts
39025
- import { existsSync as existsSync71, readFileSync as readFileSync56, writeFileSync as writeFileSync43 } from "fs";
39035
+ import { existsSync as existsSync71, readFileSync as readFileSync56, writeFileSync as writeFileSync41 } from "fs";
39026
39036
  import path87 from "path";
39027
39037
 
39028
39038
  // src/commands/rules/scopedRuleDirectories.ts
@@ -39074,7 +39084,7 @@ function updateScopedRulesIndex(root2) {
39074
39084
  const rootFile = path87.join(root2, "CLAUDE.md");
39075
39085
  const before = existsSync71(rootFile) ? readFileSync56(rootFile, "utf8") : "";
39076
39086
  const after = upsertScopedRulesPointer(before, directories);
39077
- if (after !== before) writeFileSync43(rootFile, after);
39087
+ if (after !== before) writeFileSync41(rootFile, after);
39078
39088
  return directories;
39079
39089
  }
39080
39090
 
@@ -39093,7 +39103,7 @@ function addRule(text18, options2) {
39093
39103
  const targetDir = path88.dirname(target);
39094
39104
  const root2 = findRepoRoot(targetDir) ?? targetDir;
39095
39105
  const code = nextRuleCode(root2);
39096
- writeFileSync44(
39106
+ writeFileSync42(
39097
39107
  target,
39098
39108
  insertRuleBullet(read2(target), {
39099
39109
  code,
@@ -39609,10 +39619,10 @@ function parseSlackThreadRef(value) {
39609
39619
  }
39610
39620
 
39611
39621
  // src/commands/slack/postSlackMessage.ts
39612
- import { mkdirSync as mkdirSync27, writeFileSync as writeFileSync46 } from "fs";
39622
+ import { mkdirSync as mkdirSync27, writeFileSync as writeFileSync44 } from "fs";
39613
39623
 
39614
39624
  // src/commands/slack/previewSlackThreadParts.ts
39615
- import { mkdirSync as mkdirSync26, writeFileSync as writeFileSync45 } from "fs";
39625
+ import { mkdirSync as mkdirSync26, writeFileSync as writeFileSync43 } from "fs";
39616
39626
 
39617
39627
  // src/commands/slack/readSlackParts.ts
39618
39628
  import { readFileSync as readFileSync58 } from "fs";
@@ -39658,12 +39668,12 @@ async function reviewProposedSlackMessage(target, body, workingPath) {
39658
39668
  }
39659
39669
 
39660
39670
  // src/commands/slack/slackWorkingFile.ts
39661
- import { join as join88 } from "path";
39671
+ import { join as join86 } from "path";
39662
39672
  function slackWorkingFile(channel, partIndex) {
39663
39673
  const slug2 = channel.replace(/^[#@]/, "").toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "channel";
39664
- const dir = join88(getStoreDir(), "slack");
39674
+ const dir = join86(getStoreDir(), "slack");
39665
39675
  const name = partIndex === void 0 ? slug2 : `${slug2}-${partIndex}`;
39666
- return { dir, bodyPath: join88(dir, `${name}.md`) };
39676
+ return { dir, bodyPath: join86(dir, `${name}.md`) };
39667
39677
  }
39668
39678
 
39669
39679
  // src/commands/slack/previewSlackThreadParts.ts
@@ -39678,7 +39688,7 @@ async function previewSlackThreadParts({
39678
39688
  mkdirSync26(dir, { recursive: true });
39679
39689
  const paths = bodies.map((body, index2) => {
39680
39690
  const { bodyPath } = slackWorkingFile(channel, index2 + 1);
39681
- writeFileSync45(bodyPath, `${body}
39691
+ writeFileSync43(bodyPath, `${body}
39682
39692
  `);
39683
39693
  return bodyPath;
39684
39694
  });
@@ -39730,7 +39740,7 @@ async function postSlackMessage(channelArg, options2) {
39730
39740
  }
39731
39741
  const { dir, bodyPath } = slackWorkingFile(channel);
39732
39742
  mkdirSync27(dir, { recursive: true });
39733
- writeFileSync46(bodyPath, `${body}
39743
+ writeFileSync44(bodyPath, `${body}
39734
39744
  `);
39735
39745
  await reviewProposedSlackMessage({ channel, threadTs }, body, bodyPath);
39736
39746
  console.log(`Approved for ${target}. The body to post is at:`);
@@ -40843,20 +40853,20 @@ async function configure() {
40843
40853
 
40844
40854
  // src/commands/transcript/list.ts
40845
40855
  import { existsSync as existsSync78, readdirSync as readdirSync20, statSync as statSync13 } from "fs";
40846
- import { join as join100 } from "path";
40856
+ import { join as join98 } from "path";
40847
40857
  function list3() {
40848
40858
  const { vttDir } = getTranscriptConfig();
40849
40859
  if (!existsSync78(vttDir)) return;
40850
40860
  for (const entry of readdirSync20(vttDir)) {
40851
40861
  if (!entry.endsWith(".vtt")) continue;
40852
- if (statSync13(join100(vttDir, entry)).isDirectory()) continue;
40862
+ if (statSync13(join98(vttDir, entry)).isDirectory()) continue;
40853
40863
  console.log(entry);
40854
40864
  }
40855
40865
  }
40856
40866
 
40857
40867
  // src/commands/transcript/move.ts
40858
- import { existsSync as existsSync79, mkdirSync as mkdirSync33, renameSync as renameSync4, writeFileSync as writeFileSync51 } from "fs";
40859
- import { basename as basename29, join as join101 } from "path";
40868
+ import { existsSync as existsSync79, mkdirSync as mkdirSync33, renameSync as renameSync4, writeFileSync as writeFileSync49 } from "fs";
40869
+ import { basename as basename29, join as join99 } from "path";
40860
40870
 
40861
40871
  // src/commands/transcript/convertVttToMarkdown.ts
40862
40872
  function convertVttToMarkdown(inputPath) {
@@ -40866,9 +40876,9 @@ function convertVttToMarkdown(inputPath) {
40866
40876
  // src/commands/transcript/move.ts
40867
40877
  var DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
40868
40878
  function archiveRawVtt(vttDir, sourcePath, filename) {
40869
- const processedDir = join101(vttDir, "processed");
40879
+ const processedDir = join99(vttDir, "processed");
40870
40880
  mkdirSync33(processedDir, { recursive: true });
40871
- renameSync4(sourcePath, join101(processedDir, filename));
40881
+ renameSync4(sourcePath, join99(processedDir, filename));
40872
40882
  }
40873
40883
  function move(file, options2) {
40874
40884
  const { date, client } = options2;
@@ -40878,25 +40888,25 @@ function move(file, options2) {
40878
40888
  }
40879
40889
  const { vttDir, transcriptsDir, summaryDir } = getTranscriptConfig();
40880
40890
  const filename = basename29(file);
40881
- const sourcePath = join101(vttDir, filename);
40891
+ const sourcePath = join99(vttDir, filename);
40882
40892
  if (!existsSync79(sourcePath)) {
40883
40893
  console.error(`Error: VTT file not found: ${sourcePath}`);
40884
40894
  process.exit(1);
40885
40895
  }
40886
40896
  const base = basename29(filename, ".vtt").replace(/ Transcription$/, "");
40887
40897
  const outputName = `${date} ${base}.md`;
40888
- const formattedDir = join101(transcriptsDir, client);
40898
+ const formattedDir = join99(transcriptsDir, client);
40889
40899
  mkdirSync33(formattedDir, { recursive: true });
40890
- const formattedPath = join101(formattedDir, outputName);
40891
- writeFileSync51(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
40900
+ const formattedPath = join99(formattedDir, outputName);
40901
+ writeFileSync49(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
40892
40902
  archiveRawVtt(vttDir, sourcePath, filename);
40893
- const summaryPath = join101(summaryDir, client, outputName);
40903
+ const summaryPath = join99(summaryDir, client, outputName);
40894
40904
  console.log(`Formatted transcript: ${formattedPath}`);
40895
40905
  console.log(`Summary target: ${summaryPath}`);
40896
40906
  }
40897
40907
 
40898
40908
  // src/commands/transcript/merge.ts
40899
- import { existsSync as existsSync80, writeFileSync as writeFileSync52 } from "fs";
40909
+ import { existsSync as existsSync80, writeFileSync as writeFileSync50 } from "fs";
40900
40910
  import { basename as basename30 } from "path";
40901
40911
 
40902
40912
  // src/commands/transcript/failTranscript.ts
@@ -41073,7 +41083,7 @@ async function merge(files, options2 = {}) {
41073
41083
  console.log(document);
41074
41084
  return;
41075
41085
  }
41076
- writeFileSync52(options2.out, `${document}
41086
+ writeFileSync50(options2.out, `${document}
41077
41087
  `, "utf8");
41078
41088
  console.log(`Merged transcript: ${options2.out}`);
41079
41089
  }
@@ -41185,7 +41195,7 @@ function adviceFragments() {
41185
41195
  }
41186
41196
 
41187
41197
  // src/commands/verify/blockCodeComments/findComments.ts
41188
- import { execSync as execSync62 } from "child_process";
41198
+ import { execSync as execSync57 } from "child_process";
41189
41199
  import fs49 from "fs";
41190
41200
  import { minimatch as minimatch9 } from "minimatch";
41191
41201
  import { Project as Project5 } from "ts-morph";
@@ -41424,7 +41434,7 @@ function shouldScan(file, ignoreGlobs) {
41424
41434
  return fs49.existsSync(file);
41425
41435
  }
41426
41436
  function findComments(options2) {
41427
- const diff3 = execSync62("git diff HEAD", {
41437
+ const diff3 = execSync57("git diff HEAD", {
41428
41438
  encoding: "utf8",
41429
41439
  maxBuffer: 64 * 1024 * 1024
41430
41440
  });
@@ -41580,14 +41590,16 @@ Total: ${violations.length} forbidden string(s).`);
41580
41590
  }
41581
41591
 
41582
41592
  // src/commands/verify/hardcodedColors.ts
41583
- import { execSync as execSync63 } from "child_process";
41593
+ import { execFileSync as execFileSync27 } from "child_process";
41584
41594
  import { minimatch as minimatch11 } from "minimatch";
41585
41595
  var pattern = "0x[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,6}";
41586
41596
  function hardcodedColors() {
41587
41597
  const ignoreGlobs = loadConfig().hardcodedColors?.ignore ?? [];
41588
41598
  try {
41589
- const output = execSync63(`grep -rEnH '${pattern}' src/`, {
41590
- encoding: "utf8"
41599
+ const output = execFileSync27("grep", ["-rEnH", "-f", "-", "src/"], {
41600
+ encoding: "utf8",
41601
+ input: `${pattern}
41602
+ `
41591
41603
  });
41592
41604
  const lines2 = output.trim().split("\n").filter((line) => {
41593
41605
  const match = line.match(/^(.+?):\d+:/);
@@ -41703,14 +41715,14 @@ function listMigrationFiles(dir) {
41703
41715
  }
41704
41716
 
41705
41717
  // src/commands/verify/migrations/readBaselineMigrations.ts
41706
- import { execSync as execSync64 } from "child_process";
41718
+ import { execSync as execSync58 } from "child_process";
41707
41719
  import { basename as basename31 } from "path";
41708
41720
  var MIGRATION_FILE3 = /^migration\d+[A-Za-z0-9]*\.ts$/;
41709
41721
  function readBaselineMigrations(repoRelativeDir, ref) {
41710
41722
  const baseline = /* @__PURE__ */ new Map();
41711
41723
  let listing;
41712
41724
  try {
41713
- listing = execSync64(
41725
+ listing = execSync58(
41714
41726
  `git ls-tree -r --name-only "${ref}" -- "${repoRelativeDir}"`,
41715
41727
  { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }
41716
41728
  );
@@ -41720,7 +41732,7 @@ function readBaselineMigrations(repoRelativeDir, ref) {
41720
41732
  const paths = listing.split("\n").map((line) => line.trim()).filter(Boolean).filter((path109) => MIGRATION_FILE3.test(basename31(path109)));
41721
41733
  for (const path109 of paths) {
41722
41734
  try {
41723
- const content = execSync64(`git show "${ref}:${path109}"`, {
41735
+ const content = execSync58(`git show "${ref}:${path109}"`, {
41724
41736
  encoding: "utf8",
41725
41737
  maxBuffer: 16 * 1024 * 1024,
41726
41738
  stdio: ["pipe", "pipe", "pipe"]
@@ -41733,10 +41745,10 @@ function readBaselineMigrations(repoRelativeDir, ref) {
41733
41745
  }
41734
41746
 
41735
41747
  // src/commands/verify/migrations/resolveBaselineRef.ts
41736
- import { execSync as execSync65 } from "child_process";
41748
+ import { execSync as execSync59 } from "child_process";
41737
41749
  function refExists2(ref) {
41738
41750
  try {
41739
- execSync65(`git rev-parse --verify --quiet "${ref}"`, {
41751
+ execSync59(`git rev-parse --verify --quiet "${ref}"`, {
41740
41752
  stdio: ["pipe", "pipe", "pipe"]
41741
41753
  });
41742
41754
  return true;
@@ -41812,10 +41824,10 @@ Total: ${problems.length} violation(s).`);
41812
41824
  }
41813
41825
 
41814
41826
  // src/commands/verify/noVenv.ts
41815
- import { execSync as execSync66 } from "child_process";
41827
+ import { execSync as execSync60 } from "child_process";
41816
41828
  function noVenv() {
41817
41829
  try {
41818
- const output = execSync66(
41830
+ const output = execSync60(
41819
41831
  "find . -type d -name venv -not -path '*/node_modules/*'",
41820
41832
  {
41821
41833
  encoding: "utf8"
@@ -41929,7 +41941,7 @@ function registerVerify(program2) {
41929
41941
  }
41930
41942
 
41931
41943
  // src/commands/watch/simulateDivergence.ts
41932
- import { writeFileSync as writeFileSync53 } from "fs";
41944
+ import { writeFileSync as writeFileSync51 } from "fs";
41933
41945
 
41934
41946
  // src/commands/watch/gitFailureReason.ts
41935
41947
  function gitFailureReason(error) {
@@ -41959,7 +41971,7 @@ function simulatedDivergencePath(cwd) {
41959
41971
  // src/commands/watch/simulateDivergence.ts
41960
41972
  function simulateDivergence() {
41961
41973
  try {
41962
- writeFileSync53(simulatedDivergencePath(), "");
41974
+ writeFileSync51(simulatedDivergencePath(), "");
41963
41975
  console.log(
41964
41976
  `the next assist watch wait poll in ${runGit3(["rev-parse", "--show-toplevel"])} will exit 3 as a simulated divergence`
41965
41977
  );
@@ -42349,7 +42361,7 @@ function resolveRunCwd(config, baseDir = runConfigBaseDir()) {
42349
42361
  }
42350
42362
 
42351
42363
  // src/commands/run/runPreCommands.ts
42352
- import { execSync as execSync67 } from "child_process";
42364
+ import { execSync as execSync61 } from "child_process";
42353
42365
  function writeCapturedOutput(error) {
42354
42366
  for (const stream of ["stdout", "stderr"]) {
42355
42367
  const output = error[stream];
@@ -42359,7 +42371,7 @@ function writeCapturedOutput(error) {
42359
42371
  function runPreCommands(pre, cwd, quiet) {
42360
42372
  for (const cmd of pre) {
42361
42373
  try {
42362
- execSync67(cmd, { stdio: quiet ? "pipe" : "inherit", cwd });
42374
+ execSync61(cmd, { stdio: quiet ? "pipe" : "inherit", cwd });
42363
42375
  } catch (error) {
42364
42376
  if (quiet && error && typeof error === "object")
42365
42377
  writeCapturedOutput(error);
@@ -42800,9 +42812,9 @@ async function auth() {
42800
42812
  }
42801
42813
 
42802
42814
  // src/commands/roam/postRoamActivity.ts
42803
- import { execFileSync as execFileSync22 } from "child_process";
42815
+ import { execFileSync as execFileSync28 } from "child_process";
42804
42816
  import { readdirSync as readdirSync22, readFileSync as readFileSync66, statSync as statSync14 } from "fs";
42805
- import { join as join102 } from "path";
42817
+ import { join as join100 } from "path";
42806
42818
  function findPortFile(roamDir) {
42807
42819
  let entries;
42808
42820
  try {
@@ -42811,7 +42823,7 @@ function findPortFile(roamDir) {
42811
42823
  return void 0;
42812
42824
  }
42813
42825
  const candidates = entries.filter((name) => /^roam-local-api(-[^.]+)?\.port$/.test(name)).map((name) => {
42814
- const path109 = join102(roamDir, name);
42826
+ const path109 = join100(roamDir, name);
42815
42827
  try {
42816
42828
  return { path: path109, mtimeMs: statSync14(path109).mtimeMs };
42817
42829
  } catch {
@@ -42828,7 +42840,7 @@ var PID_BY_APP = {
42828
42840
  function postRoamActivity(app, event) {
42829
42841
  const appData = process.env.APPDATA;
42830
42842
  if (!appData) return;
42831
- const portFile = findPortFile(join102(appData, "Roam"));
42843
+ const portFile = findPortFile(join100(appData, "Roam"));
42832
42844
  if (!portFile) return;
42833
42845
  let port;
42834
42846
  try {
@@ -42839,7 +42851,7 @@ function postRoamActivity(app, event) {
42839
42851
  const pid = PID_BY_APP[app] ?? 99999;
42840
42852
  const url = `http://127.0.0.1:${port}/api/v1/activity/${app}/${event}?pid=${pid}`;
42841
42853
  try {
42842
- execFileSync22("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
42854
+ execFileSync28("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
42843
42855
  stdio: "ignore"
42844
42856
  });
42845
42857
  } catch {
@@ -42963,8 +42975,8 @@ async function run3(name, args) {
42963
42975
  }
42964
42976
 
42965
42977
  // src/commands/run/add.ts
42966
- import { mkdirSync as mkdirSync34, writeFileSync as writeFileSync54 } from "fs";
42967
- import { join as join103 } from "path";
42978
+ import { mkdirSync as mkdirSync34, writeFileSync as writeFileSync52 } from "fs";
42979
+ import { join as join101 } from "path";
42968
42980
 
42969
42981
  // src/commands/run/editRepoRunList.ts
42970
42982
  async function editRepoRunList(repoName, cwd, edit2) {
@@ -43074,7 +43086,7 @@ function saveProjectRunConfig(entry) {
43074
43086
  saveConfig(config);
43075
43087
  }
43076
43088
  function createCommandFile(name) {
43077
- const dir = join103(".claude", "commands");
43089
+ const dir = join101(".claude", "commands");
43078
43090
  mkdirSync34(dir, { recursive: true });
43079
43091
  const content = `---
43080
43092
  description: Run ${name}
@@ -43082,8 +43094,8 @@ description: Run ${name}
43082
43094
 
43083
43095
  Run \`assist run ${name} $ARGUMENTS 2>&1\`.
43084
43096
  `;
43085
- const filePath = join103(dir, `${name}.md`);
43086
- writeFileSync54(filePath, content);
43097
+ const filePath = join101(dir, `${name}.md`);
43098
+ writeFileSync52(filePath, content);
43087
43099
  console.log(`Created command file: ${filePath}`);
43088
43100
  }
43089
43101
  async function add4() {
@@ -43148,8 +43160,8 @@ function link2() {
43148
43160
  }
43149
43161
 
43150
43162
  // src/commands/run/remove.ts
43151
- import { existsSync as existsSync84, unlinkSync as unlinkSync21 } from "fs";
43152
- import { join as join104 } from "path";
43163
+ import { existsSync as existsSync84, unlinkSync as unlinkSync19 } from "fs";
43164
+ import { join as join102 } from "path";
43153
43165
 
43154
43166
  // src/commands/run/removeRepoRunConfig.ts
43155
43167
  function isNamed(entry, name) {
@@ -43167,9 +43179,9 @@ function removeRepoRunConfig(name, repoName, cwd = process.cwd()) {
43167
43179
 
43168
43180
  // src/commands/run/remove.ts
43169
43181
  function deleteCommandFile(name) {
43170
- const filePath = join104(".claude", "commands", `${name}.md`);
43182
+ const filePath = join102(".claude", "commands", `${name}.md`);
43171
43183
  if (existsSync84(filePath)) {
43172
- unlinkSync21(filePath);
43184
+ unlinkSync19(filePath);
43173
43185
  console.log(`Deleted command file: ${filePath}`);
43174
43186
  }
43175
43187
  }
@@ -43251,11 +43263,11 @@ function formatLink(link3) {
43251
43263
  }
43252
43264
 
43253
43265
  // src/commands/sessions/daemon/listDaemonPids.ts
43254
- import { execFileSync as execFileSync23 } from "child_process";
43266
+ import { execFileSync as execFileSync29 } from "child_process";
43255
43267
  function listDaemonPids() {
43256
43268
  if (process.platform === "win32") return [];
43257
43269
  try {
43258
- const out = execFileSync23("ps", ["-eo", "pid=,args="], {
43270
+ const out = execFileSync29("ps", ["-eo", "pid=,args="], {
43259
43271
  encoding: "utf8"
43260
43272
  });
43261
43273
  return out.split("\n").filter((line) => line.includes("assist") && / daemon run\b/.test(line)).map((line) => Number.parseInt(line.trim(), 10)).filter((pid) => Number.isInteger(pid));
@@ -43773,7 +43785,7 @@ function sendResizeSnapshot(s, send) {
43773
43785
  }
43774
43786
 
43775
43787
  // src/commands/sessions/daemon/viewerSize.ts
43776
- import { readFileSync as readFileSync68, writeFileSync as writeFileSync55 } from "fs";
43788
+ import { readFileSync as readFileSync68, writeFileSync as writeFileSync53 } from "fs";
43777
43789
  var DEFAULT_SIZE = { cols: 120, rows: 30 };
43778
43790
  var remembered;
43779
43791
  function rememberViewerSize(cols, rows) {
@@ -43781,7 +43793,7 @@ function rememberViewerSize(cols, rows) {
43781
43793
  if (remembered?.cols === cols && remembered.rows === rows) return;
43782
43794
  remembered = { cols, rows };
43783
43795
  try {
43784
- writeFileSync55(daemonPaths.viewerSize, JSON.stringify(remembered));
43796
+ writeFileSync53(daemonPaths.viewerSize, JSON.stringify(remembered));
43785
43797
  } catch (error) {
43786
43798
  daemonLog(
43787
43799
  `viewer size ${cols}x${rows} not saved: ${error instanceof Error ? error.message : String(error)}`
@@ -44335,12 +44347,12 @@ function createRunSession(id, { runName, runArgs, cwd, meta }) {
44335
44347
  }
44336
44348
 
44337
44349
  // src/commands/sessions/daemon/autoUpdate/autoUpdateControl.ts
44338
- import { existsSync as existsSync88, rmSync as rmSync10, writeFileSync as writeFileSync56 } from "fs";
44350
+ import { existsSync as existsSync88, rmSync as rmSync10, writeFileSync as writeFileSync54 } from "fs";
44339
44351
  var paused;
44340
44352
  var wake;
44341
44353
  function persist2(value) {
44342
44354
  try {
44343
- if (value) writeFileSync56(daemonPaths.autoUpdatePaused, "");
44355
+ if (value) writeFileSync54(daemonPaths.autoUpdatePaused, "");
44344
44356
  else rmSync10(daemonPaths.autoUpdatePaused, { force: true });
44345
44357
  } catch {
44346
44358
  }
@@ -44465,7 +44477,7 @@ async function runAutoUpdateLoop(deps2, maxLaps = Number.POSITIVE_INFINITY) {
44465
44477
  }
44466
44478
 
44467
44479
  // src/commands/sessions/daemon/autoUpdate/trimWatcherLog.ts
44468
- import { readFileSync as readFileSync70, writeFileSync as writeFileSync57 } from "fs";
44480
+ import { readFileSync as readFileSync70, writeFileSync as writeFileSync55 } from "fs";
44469
44481
  var KEEP_TAIL = 256 * 1024;
44470
44482
  var MAX_LOG_SIZE = 4 * 1024 * 1024;
44471
44483
  function trimWatcherLog(cwd) {
@@ -44477,7 +44489,7 @@ function trimWatcherLog(cwd) {
44477
44489
  return;
44478
44490
  }
44479
44491
  if (log2.length <= MAX_LOG_SIZE) return;
44480
- writeFileSync57(path109, log2.slice(-KEEP_TAIL));
44492
+ writeFileSync55(path109, log2.slice(-KEEP_TAIL));
44481
44493
  daemonLog(`auto-update: log ${path109} trimmed to its last ${KEEP_TAIL} chars`);
44482
44494
  }
44483
44495
 
@@ -44779,12 +44791,12 @@ import { basename as basename32 } from "path";
44779
44791
 
44780
44792
  // src/commands/sessions/daemon/worktree/deleteStrandedTree.ts
44781
44793
  import { existsSync as existsSync89 } from "fs";
44782
- import { join as join107 } from "path";
44794
+ import { join as join105 } from "path";
44783
44795
 
44784
44796
  // src/commands/sessions/daemon/worktree/deleteTreeDirectly.ts
44785
44797
  import { statSync as statSync16 } from "fs";
44786
44798
  import { rm as rm3 } from "fs/promises";
44787
- import { join as join106 } from "path";
44799
+ import { join as join104 } from "path";
44788
44800
  async function deleteTreeDirectly(clone, worktreePath, why) {
44789
44801
  if (holdsAGitDirectoryRatherThanALink(worktreePath)) {
44790
44802
  const refusal = "it is a clone of its own, not a linked worktree";
@@ -44812,7 +44824,7 @@ async function deleteTreeDirectly(clone, worktreePath, why) {
44812
44824
  return { removed: true };
44813
44825
  }
44814
44826
  function holdsAGitDirectoryRatherThanALink(worktreePath) {
44815
- return statSync16(join106(worktreePath, ".git"), {
44827
+ return statSync16(join104(worktreePath, ".git"), {
44816
44828
  throwIfNoEntry: false
44817
44829
  })?.isDirectory() === true;
44818
44830
  }
@@ -44848,7 +44860,7 @@ async function deleteStrandedTree(clone, worktreePath, cause) {
44848
44860
  );
44849
44861
  }
44850
44862
  function strandedReason(worktreePath, cause) {
44851
- if (!existsSync89(join107(worktreePath, ".git")))
44863
+ if (!existsSync89(join105(worktreePath, ".git")))
44852
44864
  return "its .git link is already gone";
44853
44865
  if (/not a working tree|not a git repository/i.test(reason2(cause)))
44854
44866
  return "git no longer recognises it as a working tree";
@@ -47187,7 +47199,7 @@ function releaseClient(client, clients, prPreview, verify) {
47187
47199
  }
47188
47200
 
47189
47201
  // src/commands/sessions/daemon/findPortHolderPid.ts
47190
- import { execFileSync as execFileSync24 } from "child_process";
47202
+ import { execFileSync as execFileSync30 } from "child_process";
47191
47203
  var PROBE_TIMEOUT_MS = 3e3;
47192
47204
  function findPortHolderPid(port) {
47193
47205
  try {
@@ -47197,7 +47209,7 @@ function findPortHolderPid(port) {
47197
47209
  }
47198
47210
  }
47199
47211
  function probe(command, args) {
47200
- return execFileSync24(command, args, {
47212
+ return execFileSync30(command, args, {
47201
47213
  encoding: "utf8",
47202
47214
  timeout: PROBE_TIMEOUT_MS,
47203
47215
  stdio: ["ignore", "pipe", "ignore"]
@@ -47382,10 +47394,10 @@ function deferralNotice(persisted, cap2) {
47382
47394
 
47383
47395
  // src/commands/sessions/daemon/worktree/underTempRoot.ts
47384
47396
  import { realpathSync as realpathSync3 } from "fs";
47385
- import { tmpdir as tmpdir9 } from "os";
47397
+ import { tmpdir as tmpdir7 } from "os";
47386
47398
  import { sep as sep5 } from "path";
47387
47399
  function tempRoots() {
47388
- const raw = tmpdir9();
47400
+ const raw = tmpdir7();
47389
47401
  const roots = /* @__PURE__ */ new Set([raw]);
47390
47402
  try {
47391
47403
  roots.add(realpathSync3(raw));
@@ -49173,7 +49185,7 @@ import { existsSync as existsSync98 } from "fs";
49173
49185
 
49174
49186
  // src/commands/sessions/daemon/worktree/carryTranscriptToTree.ts
49175
49187
  import { copyFileSync as copyFileSync5, existsSync as existsSync97, mkdirSync as mkdirSync38 } from "fs";
49176
- import { join as join109 } from "path";
49188
+ import { join as join107 } from "path";
49177
49189
  function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
49178
49190
  const dir = projectDirForCwd(toCwd);
49179
49191
  if (dir === projectDirForCwd(fromCwd)) {
@@ -49182,7 +49194,7 @@ function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
49182
49194
  );
49183
49195
  return;
49184
49196
  }
49185
- const dest = join109(dir, `${claudeSessionId}.jsonl`);
49197
+ const dest = join107(dir, `${claudeSessionId}.jsonl`);
49186
49198
  if (existsSync97(dest)) {
49187
49199
  daemonLog(`transcript ${claudeSessionId} already present in ${dir}`);
49188
49200
  return;
@@ -49461,7 +49473,7 @@ function startDaemonLogTrimmer(intervalMs = TRIM_INTERVAL_MS) {
49461
49473
  }
49462
49474
 
49463
49475
  // src/commands/sessions/daemon/startDaemonServer.ts
49464
- import { unlinkSync as unlinkSync23 } from "fs";
49476
+ import { unlinkSync as unlinkSync21 } from "fs";
49465
49477
  import * as net2 from "net";
49466
49478
 
49467
49479
  // src/commands/sessions/daemon/exitAfterFlush.ts
@@ -49495,10 +49507,10 @@ function autoUpdateReply() {
49495
49507
  }
49496
49508
 
49497
49509
  // src/commands/sessions/daemon/autoUpdate/applyAutoUpdateAction.ts
49498
- import { rmSync as rmSync12, writeFileSync as writeFileSync58 } from "fs";
49510
+ import { rmSync as rmSync12, writeFileSync as writeFileSync56 } from "fs";
49499
49511
  function signalLap(installDir, marker2) {
49500
49512
  const control = watchControlPaths(installDir);
49501
- if (control) writeFileSync58(control[marker2], "");
49513
+ if (control) writeFileSync56(control[marker2], "");
49502
49514
  }
49503
49515
  function applyAutoUpdateAction(action) {
49504
49516
  const installDir = getInstallDir();
@@ -50347,7 +50359,7 @@ function handleConnection(socket, manager) {
50347
50359
  }
50348
50360
 
50349
50361
  // src/commands/sessions/daemon/onListening.ts
50350
- import { unlinkSync as unlinkSync22, writeFileSync as writeFileSync59 } from "fs";
50362
+ import { unlinkSync as unlinkSync20, writeFileSync as writeFileSync57 } from "fs";
50351
50363
 
50352
50364
  // src/commands/sessions/daemon/startPidFileWatchdog.ts
50353
50365
  import { readFileSync as readFileSync71 } from "fs";
@@ -50369,7 +50381,7 @@ function ownsPidFile() {
50369
50381
 
50370
50382
  // src/commands/sessions/daemon/onListening.ts
50371
50383
  function onListening(manager, checkAutoExit) {
50372
- writeFileSync59(daemonPaths.pid, String(process.pid));
50384
+ writeFileSync57(daemonPaths.pid, String(process.pid));
50373
50385
  startPidFileWatchdog(() => {
50374
50386
  daemonLog("lost daemon.pid ownership; shutting down sessions and exiting");
50375
50387
  void manager.flushActiveMs().finally(() => {
@@ -50397,12 +50409,12 @@ function onListening(manager, checkAutoExit) {
50397
50409
  function cleanupOwnedFiles() {
50398
50410
  if (!ownsPidFile()) return;
50399
50411
  try {
50400
- unlinkSync22(daemonPaths.pid);
50412
+ unlinkSync20(daemonPaths.pid);
50401
50413
  } catch {
50402
50414
  }
50403
50415
  if (process.platform !== "win32") {
50404
50416
  try {
50405
- unlinkSync22(daemonPaths.socket);
50417
+ unlinkSync20(daemonPaths.socket);
50406
50418
  } catch {
50407
50419
  }
50408
50420
  }
@@ -50450,7 +50462,7 @@ async function recoverFromAddrInUse(server, manager, checkAutoExit) {
50450
50462
  }
50451
50463
  daemonLog("removing stale socket left by a crashed daemon");
50452
50464
  try {
50453
- unlinkSync23(daemonPaths.socket);
50465
+ unlinkSync21(daemonPaths.socket);
50454
50466
  } catch {
50455
50467
  }
50456
50468
  listenWithSingleOnListening(server, manager, checkAutoExit);
@@ -51066,7 +51078,7 @@ function summaryPathFor(jsonlPath2) {
51066
51078
  }
51067
51079
 
51068
51080
  // src/commands/sessions/summarise/summariseSession.ts
51069
- import { execFileSync as execFileSync25 } from "child_process";
51081
+ import { execFileSync as execFileSync31 } from "child_process";
51070
51082
  function summariseSession(jsonlPath2) {
51071
51083
  const firstMessage = extractFirstUserMessage(jsonlPath2);
51072
51084
  const backlogIds = scanSessionBacklogRefs(jsonlPath2);
@@ -51075,7 +51087,7 @@ function summariseSession(jsonlPath2) {
51075
51087
  }
51076
51088
  const prompt = buildPrompt6(firstMessage, backlogIds);
51077
51089
  try {
51078
- const output = execFileSync25("claude", ["-p", "--model", "haiku", prompt], {
51090
+ const output = execFileSync31("claude", ["-p", "--model", "haiku", prompt], {
51079
51091
  encoding: "utf8",
51080
51092
  timeout: 3e4,
51081
51093
  stdio: ["ignore", "pipe", "ignore"]