@staff0rd/assist 0.487.0 → 0.487.1

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.487.0",
9
+ version: "0.487.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -20906,6 +20906,25 @@ function fetchLineComments(org, repo, prNumber, threadInfo) {
20906
20906
  import { mkdirSync as mkdirSync18, writeFileSync as writeFileSync35 } from "fs";
20907
20907
  import { dirname as dirname28 } from "path";
20908
20908
  import { stringify } from "yaml";
20909
+
20910
+ // src/commands/prs/removeStaleCommentsCaches.ts
20911
+ import { readdirSync as readdirSync10, unlinkSync as unlinkSync16 } from "fs";
20912
+ import { join as join58 } from "path";
20913
+ var STALE_PATTERN = /^pr-\d+-comments\.yaml$/;
20914
+ function removeStaleCommentsCaches(cwd = process.cwd()) {
20915
+ const dir = join58(cwd, ".assist");
20916
+ let entries;
20917
+ try {
20918
+ entries = readdirSync10(dir);
20919
+ } catch {
20920
+ return;
20921
+ }
20922
+ for (const entry of entries.filter((e) => STALE_PATTERN.test(e))) {
20923
+ unlinkSync16(join58(dir, entry));
20924
+ }
20925
+ }
20926
+
20927
+ // src/commands/prs/listComments/updateCommentsCache.ts
20909
20928
  function writeCommentsCache(org, repo, prNumber, comments3) {
20910
20929
  const cachePath = commentsCachePath(org, repo, prNumber);
20911
20930
  mkdirSync18(dirname28(cachePath), { recursive: true });
@@ -20917,6 +20936,7 @@ function writeCommentsCache(org, repo, prNumber, comments3) {
20917
20936
  writeFileSync35(cachePath, stringify(cacheData));
20918
20937
  }
20919
20938
  function updateCommentsCache(org, repo, prNumber, comments3) {
20939
+ removeStaleCommentsCaches();
20920
20940
  if (comments3.some((c) => c.type === "line")) {
20921
20941
  writeCommentsCache(org, repo, prNumber, comments3);
20922
20942
  } else {
@@ -23784,9 +23804,9 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
23784
23804
 
23785
23805
  // src/commands/review/buildReviewPaths.ts
23786
23806
  import { homedir as homedir21 } from "os";
23787
- import { basename as basename16, join as join58 } from "path";
23807
+ import { basename as basename16, join as join59 } from "path";
23788
23808
  function buildReviewPaths(repoRoot, key) {
23789
- const reviewDir = join58(
23809
+ const reviewDir = join59(
23790
23810
  homedir21(),
23791
23811
  ".assist",
23792
23812
  "reviews",
@@ -23795,10 +23815,10 @@ function buildReviewPaths(repoRoot, key) {
23795
23815
  );
23796
23816
  return {
23797
23817
  reviewDir,
23798
- requestPath: join58(reviewDir, "request.md"),
23799
- claudePath: join58(reviewDir, "claude.md"),
23800
- codexPath: join58(reviewDir, "codex.md"),
23801
- synthesisPath: join58(reviewDir, "synthesis.md")
23818
+ requestPath: join59(reviewDir, "request.md"),
23819
+ claudePath: join59(reviewDir, "claude.md"),
23820
+ codexPath: join59(reviewDir, "codex.md"),
23821
+ synthesisPath: join59(reviewDir, "synthesis.md")
23802
23822
  };
23803
23823
  }
23804
23824
 
@@ -24337,10 +24357,10 @@ async function handlePostSynthesis(synthesisPath, options2) {
24337
24357
  }
24338
24358
 
24339
24359
  // src/commands/review/prepareReviewDir.ts
24340
- import { existsSync as existsSync49, mkdirSync as mkdirSync19, unlinkSync as unlinkSync16, writeFileSync as writeFileSync36 } from "fs";
24360
+ import { existsSync as existsSync49, mkdirSync as mkdirSync19, unlinkSync as unlinkSync17, writeFileSync as writeFileSync36 } from "fs";
24341
24361
  function clearReviewFiles(paths) {
24342
24362
  for (const path71 of [paths.claudePath, paths.codexPath, paths.synthesisPath]) {
24343
- if (existsSync49(path71)) unlinkSync16(path71);
24363
+ if (existsSync49(path71)) unlinkSync17(path71);
24344
24364
  }
24345
24365
  }
24346
24366
  function prepareReviewDir(paths, requestBody, force) {
@@ -24625,7 +24645,7 @@ function printReviewerFailures(results) {
24625
24645
  }
24626
24646
 
24627
24647
  // src/commands/review/runAndSynthesise.ts
24628
- import { existsSync as existsSync51, unlinkSync as unlinkSync18 } from "fs";
24648
+ import { existsSync as existsSync51, unlinkSync as unlinkSync19 } from "fs";
24629
24649
 
24630
24650
  // src/commands/review/buildReviewerStdin.ts
24631
24651
  var REVIEW_PROMPT = `You are acting as a reviewer for a proposed code change made by another engineer. The full review request \u2014 branch, base, changed files, and unified diff \u2014 is in the request file whose absolute path is given below.
@@ -25045,7 +25065,7 @@ function resolveClaude(args) {
25045
25065
  }
25046
25066
 
25047
25067
  // src/commands/review/runCodexReviewer.ts
25048
- import { existsSync as existsSync50, unlinkSync as unlinkSync17 } from "fs";
25068
+ import { existsSync as existsSync50, unlinkSync as unlinkSync18 } from "fs";
25049
25069
 
25050
25070
  // src/commands/review/parseCodexEvent.ts
25051
25071
  function isItemStarted(value) {
@@ -25098,7 +25118,7 @@ async function runCodexReviewer(spec) {
25098
25118
  }
25099
25119
  });
25100
25120
  if (result.exitCode !== 0 && existsSync50(spec.outputPath)) {
25101
- unlinkSync17(spec.outputPath);
25121
+ unlinkSync18(spec.outputPath);
25102
25122
  }
25103
25123
  return finaliseReviewerRun({ ...spec, command }, spinner, result);
25104
25124
  }
@@ -25244,7 +25264,7 @@ async function runAndSynthesise(args) {
25244
25264
  return { ok: false, failures };
25245
25265
  }
25246
25266
  if (anyFresh && existsSync51(paths.synthesisPath)) {
25247
- unlinkSync18(paths.synthesisPath);
25267
+ unlinkSync19(paths.synthesisPath);
25248
25268
  }
25249
25269
  const synthesisResult = await synthesise(paths, { multi });
25250
25270
  if (synthesisResult.exitCode !== 0) failures.push(synthesisResult);
@@ -26116,14 +26136,14 @@ async function configure() {
26116
26136
  }
26117
26137
 
26118
26138
  // src/commands/transcript/list.ts
26119
- import { existsSync as existsSync52, readdirSync as readdirSync10, statSync as statSync9 } from "fs";
26120
- import { join as join59 } from "path";
26139
+ import { existsSync as existsSync52, readdirSync as readdirSync11, statSync as statSync9 } from "fs";
26140
+ import { join as join60 } from "path";
26121
26141
  function list4() {
26122
26142
  const { vttDir } = getTranscriptConfig();
26123
26143
  if (!existsSync52(vttDir)) return;
26124
- for (const entry of readdirSync10(vttDir)) {
26144
+ for (const entry of readdirSync11(vttDir)) {
26125
26145
  if (!entry.endsWith(".vtt")) continue;
26126
- if (statSync9(join59(vttDir, entry)).isDirectory()) continue;
26146
+ if (statSync9(join60(vttDir, entry)).isDirectory()) continue;
26127
26147
  console.log(entry);
26128
26148
  }
26129
26149
  }
@@ -26136,7 +26156,7 @@ import {
26136
26156
  renameSync as renameSync2,
26137
26157
  writeFileSync as writeFileSync38
26138
26158
  } from "fs";
26139
- import { basename as basename17, join as join60 } from "path";
26159
+ import { basename as basename17, join as join61 } from "path";
26140
26160
 
26141
26161
  // src/commands/transcript/cleanText.ts
26142
26162
  function cleanText(text17) {
@@ -26349,9 +26369,9 @@ function convertVttToMarkdown(inputPath) {
26349
26369
  return formatChatLog(messages);
26350
26370
  }
26351
26371
  function archiveRawVtt(vttDir, sourcePath, filename) {
26352
- const processedDir = join60(vttDir, "processed");
26372
+ const processedDir = join61(vttDir, "processed");
26353
26373
  mkdirSync20(processedDir, { recursive: true });
26354
- renameSync2(sourcePath, join60(processedDir, filename));
26374
+ renameSync2(sourcePath, join61(processedDir, filename));
26355
26375
  }
26356
26376
  function move(file, options2) {
26357
26377
  const { date, client } = options2;
@@ -26361,19 +26381,19 @@ function move(file, options2) {
26361
26381
  }
26362
26382
  const { vttDir, transcriptsDir, summaryDir } = getTranscriptConfig();
26363
26383
  const filename = basename17(file);
26364
- const sourcePath = join60(vttDir, filename);
26384
+ const sourcePath = join61(vttDir, filename);
26365
26385
  if (!existsSync53(sourcePath)) {
26366
26386
  console.error(`Error: VTT file not found: ${sourcePath}`);
26367
26387
  process.exit(1);
26368
26388
  }
26369
26389
  const base = basename17(filename, ".vtt").replace(/ Transcription$/, "");
26370
26390
  const outputName = `${date} ${base}.md`;
26371
- const formattedDir = join60(transcriptsDir, client);
26391
+ const formattedDir = join61(transcriptsDir, client);
26372
26392
  mkdirSync20(formattedDir, { recursive: true });
26373
- const formattedPath = join60(formattedDir, outputName);
26393
+ const formattedPath = join61(formattedDir, outputName);
26374
26394
  writeFileSync38(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
26375
26395
  archiveRawVtt(vttDir, sourcePath, filename);
26376
- const summaryPath = join60(summaryDir, client, outputName);
26396
+ const summaryPath = join61(summaryDir, client, outputName);
26377
26397
  console.log(`Formatted transcript: ${formattedPath}`);
26378
26398
  console.log(`Summary target: ${summaryPath}`);
26379
26399
  }
@@ -26493,38 +26513,38 @@ function registerVerify(program2) {
26493
26513
 
26494
26514
  // src/commands/voice/devices.ts
26495
26515
  import { spawnSync as spawnSync6 } from "child_process";
26496
- import { join as join62 } from "path";
26516
+ import { join as join63 } from "path";
26497
26517
 
26498
26518
  // src/commands/voice/shared.ts
26499
26519
  import { homedir as homedir22 } from "os";
26500
- import { dirname as dirname30, join as join61 } from "path";
26520
+ import { dirname as dirname30, join as join62 } from "path";
26501
26521
  import { fileURLToPath as fileURLToPath7 } from "url";
26502
26522
  var __dirname5 = dirname30(fileURLToPath7(import.meta.url));
26503
- var VOICE_DIR = join61(homedir22(), ".assist", "voice");
26523
+ var VOICE_DIR = join62(homedir22(), ".assist", "voice");
26504
26524
  var voicePaths = {
26505
26525
  dir: VOICE_DIR,
26506
- pid: join61(VOICE_DIR, "voice.pid"),
26507
- log: join61(VOICE_DIR, "voice.log"),
26508
- venv: join61(VOICE_DIR, ".venv"),
26509
- lock: join61(VOICE_DIR, "voice.lock")
26526
+ pid: join62(VOICE_DIR, "voice.pid"),
26527
+ log: join62(VOICE_DIR, "voice.log"),
26528
+ venv: join62(VOICE_DIR, ".venv"),
26529
+ lock: join62(VOICE_DIR, "voice.lock")
26510
26530
  };
26511
26531
  function getPythonDir() {
26512
- return join61(__dirname5, "commands", "voice", "python");
26532
+ return join62(__dirname5, "commands", "voice", "python");
26513
26533
  }
26514
26534
  function getVenvPython() {
26515
- return process.platform === "win32" ? join61(voicePaths.venv, "Scripts", "python.exe") : join61(voicePaths.venv, "bin", "python");
26535
+ return process.platform === "win32" ? join62(voicePaths.venv, "Scripts", "python.exe") : join62(voicePaths.venv, "bin", "python");
26516
26536
  }
26517
26537
  function getLockDir() {
26518
26538
  const config = loadConfig();
26519
26539
  return config.voice?.lockDir ?? VOICE_DIR;
26520
26540
  }
26521
26541
  function getLockFile() {
26522
- return join61(getLockDir(), "voice.lock");
26542
+ return join62(getLockDir(), "voice.lock");
26523
26543
  }
26524
26544
 
26525
26545
  // src/commands/voice/devices.ts
26526
26546
  function devices() {
26527
- const script = join62(getPythonDir(), "list_devices.py");
26547
+ const script = join63(getPythonDir(), "list_devices.py");
26528
26548
  spawnSync6(getVenvPython(), [script], { stdio: "inherit" });
26529
26549
  }
26530
26550
 
@@ -26559,12 +26579,12 @@ function logs(options2) {
26559
26579
  // src/commands/voice/setup.ts
26560
26580
  import { spawnSync as spawnSync7 } from "child_process";
26561
26581
  import { mkdirSync as mkdirSync22 } from "fs";
26562
- import { join as join64 } from "path";
26582
+ import { join as join65 } from "path";
26563
26583
 
26564
26584
  // src/commands/voice/checkLockFile.ts
26565
26585
  import { execSync as execSync59 } from "child_process";
26566
26586
  import { existsSync as existsSync55, mkdirSync as mkdirSync21, readFileSync as readFileSync45, writeFileSync as writeFileSync39 } from "fs";
26567
- import { join as join63 } from "path";
26587
+ import { join as join64 } from "path";
26568
26588
  function isProcessAlive2(pid) {
26569
26589
  try {
26570
26590
  process.kill(pid, 0);
@@ -26601,7 +26621,7 @@ function bootstrapVenv() {
26601
26621
  }
26602
26622
  function writeLockFile(pid) {
26603
26623
  const lockFile = getLockFile();
26604
- mkdirSync21(join63(lockFile, ".."), { recursive: true });
26624
+ mkdirSync21(join64(lockFile, ".."), { recursive: true });
26605
26625
  writeFileSync39(
26606
26626
  lockFile,
26607
26627
  JSON.stringify({
@@ -26617,7 +26637,7 @@ function setup() {
26617
26637
  mkdirSync22(voicePaths.dir, { recursive: true });
26618
26638
  bootstrapVenv();
26619
26639
  console.log("\nDownloading models...\n");
26620
- const script = join64(getPythonDir(), "setup_models.py");
26640
+ const script = join65(getPythonDir(), "setup_models.py");
26621
26641
  const result = spawnSync7(getVenvPython(), [script], {
26622
26642
  stdio: "inherit",
26623
26643
  env: { ...process.env, VOICE_LOG_FILE: voicePaths.log }
@@ -26631,7 +26651,7 @@ function setup() {
26631
26651
  // src/commands/voice/start.ts
26632
26652
  import { spawn as spawn8 } from "child_process";
26633
26653
  import { mkdirSync as mkdirSync23, writeFileSync as writeFileSync40 } from "fs";
26634
- import { join as join65 } from "path";
26654
+ import { join as join66 } from "path";
26635
26655
 
26636
26656
  // src/commands/voice/buildDaemonEnv.ts
26637
26657
  function buildDaemonEnv(options2) {
@@ -26669,7 +26689,7 @@ function start2(options2) {
26669
26689
  bootstrapVenv();
26670
26690
  const debug = options2.debug || options2.foreground || process.platform === "win32";
26671
26691
  const env = buildDaemonEnv({ debug });
26672
- const script = join65(getPythonDir(), "voice_daemon.py");
26692
+ const script = join66(getPythonDir(), "voice_daemon.py");
26673
26693
  const python = getVenvPython();
26674
26694
  if (options2.foreground) {
26675
26695
  spawnForeground(python, script, env);
@@ -26717,7 +26737,7 @@ function status2() {
26717
26737
  }
26718
26738
 
26719
26739
  // src/commands/voice/stop.ts
26720
- import { existsSync as existsSync57, readFileSync as readFileSync47, unlinkSync as unlinkSync19 } from "fs";
26740
+ import { existsSync as existsSync57, readFileSync as readFileSync47, unlinkSync as unlinkSync20 } from "fs";
26721
26741
  function stop2() {
26722
26742
  if (!existsSync57(voicePaths.pid)) {
26723
26743
  console.log("Voice daemon is not running (no PID file)");
@@ -26731,12 +26751,12 @@ function stop2() {
26731
26751
  console.log(`Voice daemon (PID ${pid}) is not running`);
26732
26752
  }
26733
26753
  try {
26734
- unlinkSync19(voicePaths.pid);
26754
+ unlinkSync20(voicePaths.pid);
26735
26755
  } catch {
26736
26756
  }
26737
26757
  try {
26738
26758
  const lockFile = getLockFile();
26739
- if (existsSync57(lockFile)) unlinkSync19(lockFile);
26759
+ if (existsSync57(lockFile)) unlinkSync20(lockFile);
26740
26760
  } catch {
26741
26761
  }
26742
26762
  console.log("Voice daemon stopped");
@@ -27196,17 +27216,17 @@ async function auth() {
27196
27216
 
27197
27217
  // src/commands/roam/postRoamActivity.ts
27198
27218
  import { execFileSync as execFileSync12 } from "child_process";
27199
- import { readdirSync as readdirSync11, readFileSync as readFileSync48, statSync as statSync10 } from "fs";
27200
- import { join as join66 } from "path";
27219
+ import { readdirSync as readdirSync12, readFileSync as readFileSync48, statSync as statSync10 } from "fs";
27220
+ import { join as join67 } from "path";
27201
27221
  function findPortFile(roamDir) {
27202
27222
  let entries;
27203
27223
  try {
27204
- entries = readdirSync11(roamDir);
27224
+ entries = readdirSync12(roamDir);
27205
27225
  } catch {
27206
27226
  return void 0;
27207
27227
  }
27208
27228
  const candidates = entries.filter((name) => /^roam-local-api(-[^.]+)?\.port$/.test(name)).map((name) => {
27209
- const path71 = join66(roamDir, name);
27229
+ const path71 = join67(roamDir, name);
27210
27230
  try {
27211
27231
  return { path: path71, mtimeMs: statSync10(path71).mtimeMs };
27212
27232
  } catch {
@@ -27218,7 +27238,7 @@ function findPortFile(roamDir) {
27218
27238
  function postRoamActivity(app, event) {
27219
27239
  const appData = process.env.APPDATA;
27220
27240
  if (!appData) return;
27221
- const portFile = findPortFile(join66(appData, "Roam"));
27241
+ const portFile = findPortFile(join67(appData, "Roam"));
27222
27242
  if (!portFile) return;
27223
27243
  let port;
27224
27244
  try {
@@ -27451,13 +27471,13 @@ function runPreCommands(pre, cwd) {
27451
27471
  // src/commands/run/spawnRunCommand.ts
27452
27472
  import { execFileSync as execFileSync13, spawn as spawn9 } from "child_process";
27453
27473
  import { existsSync as existsSync58 } from "fs";
27454
- import { dirname as dirname31, join as join67, resolve as resolve16 } from "path";
27474
+ import { dirname as dirname31, join as join68, resolve as resolve16 } from "path";
27455
27475
  function resolveCommand2(command) {
27456
27476
  if (process.platform !== "win32" || command !== "bash") return command;
27457
27477
  try {
27458
27478
  const gitPath = execFileSync13("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
27459
27479
  const gitRoot = resolve16(dirname31(gitPath), "..");
27460
- const gitBash = join67(gitRoot, "bin", "bash.exe");
27480
+ const gitBash = join68(gitRoot, "bin", "bash.exe");
27461
27481
  if (existsSync58(gitBash)) return gitBash;
27462
27482
  } catch {
27463
27483
  }
@@ -27546,7 +27566,7 @@ async function run3(name, args) {
27546
27566
 
27547
27567
  // src/commands/run/add.ts
27548
27568
  import { mkdirSync as mkdirSync24, writeFileSync as writeFileSync41 } from "fs";
27549
- import { join as join68 } from "path";
27569
+ import { join as join69 } from "path";
27550
27570
 
27551
27571
  // src/commands/run/extractOption.ts
27552
27572
  function extractOption(args, flag) {
@@ -27607,7 +27627,7 @@ function saveNewRunConfig(name, command, args, cwd) {
27607
27627
  saveConfig(config);
27608
27628
  }
27609
27629
  function createCommandFile(name) {
27610
- const dir = join68(".claude", "commands");
27630
+ const dir = join69(".claude", "commands");
27611
27631
  mkdirSync24(dir, { recursive: true });
27612
27632
  const content = `---
27613
27633
  description: Run ${name}
@@ -27615,7 +27635,7 @@ description: Run ${name}
27615
27635
 
27616
27636
  Run \`assist run ${name} $ARGUMENTS 2>&1\`.
27617
27637
  `;
27618
- const filePath = join68(dir, `${name}.md`);
27638
+ const filePath = join69(dir, `${name}.md`);
27619
27639
  writeFileSync41(filePath, content);
27620
27640
  console.log(`Created command file: ${filePath}`);
27621
27641
  }
@@ -27671,8 +27691,8 @@ function link2() {
27671
27691
  }
27672
27692
 
27673
27693
  // src/commands/run/remove.ts
27674
- import { existsSync as existsSync59, unlinkSync as unlinkSync20 } from "fs";
27675
- import { join as join69 } from "path";
27694
+ import { existsSync as existsSync59, unlinkSync as unlinkSync21 } from "fs";
27695
+ import { join as join70 } from "path";
27676
27696
  function findRemoveIndex() {
27677
27697
  const idx = process.argv.indexOf("remove");
27678
27698
  if (idx === -1 || idx + 1 >= process.argv.length) return -1;
@@ -27687,9 +27707,9 @@ function parseRemoveName() {
27687
27707
  return process.argv[idx + 1];
27688
27708
  }
27689
27709
  function deleteCommandFile(name) {
27690
- const filePath = join69(".claude", "commands", `${name}.md`);
27710
+ const filePath = join70(".claude", "commands", `${name}.md`);
27691
27711
  if (existsSync59(filePath)) {
27692
- unlinkSync20(filePath);
27712
+ unlinkSync21(filePath);
27693
27713
  console.log(`Deleted command file: ${filePath}`);
27694
27714
  }
27695
27715
  }
@@ -27742,9 +27762,9 @@ function registerRun(program2) {
27742
27762
 
27743
27763
  // src/commands/screenshot/index.ts
27744
27764
  import { execSync as execSync61 } from "child_process";
27745
- import { existsSync as existsSync60, mkdirSync as mkdirSync25, unlinkSync as unlinkSync21, writeFileSync as writeFileSync42 } from "fs";
27765
+ import { existsSync as existsSync60, mkdirSync as mkdirSync25, unlinkSync as unlinkSync22, writeFileSync as writeFileSync42 } from "fs";
27746
27766
  import { tmpdir as tmpdir8 } from "os";
27747
- import { join as join70, resolve as resolve18 } from "path";
27767
+ import { join as join71, resolve as resolve18 } from "path";
27748
27768
  import chalk209 from "chalk";
27749
27769
 
27750
27770
  // src/commands/screenshot/captureWindowPs1.ts
@@ -27881,7 +27901,7 @@ function buildOutputPath(outputDir, processName) {
27881
27901
  return resolve18(outputDir, `${processName}-${timestamp6}.png`);
27882
27902
  }
27883
27903
  function runPowerShellScript(processName, outputPath) {
27884
- const scriptPath = join70(tmpdir8(), `assist-screenshot-${Date.now()}.ps1`);
27904
+ const scriptPath = join71(tmpdir8(), `assist-screenshot-${Date.now()}.ps1`);
27885
27905
  writeFileSync42(scriptPath, captureWindowPs1, "utf8");
27886
27906
  try {
27887
27907
  execSync61(
@@ -27889,7 +27909,7 @@ function runPowerShellScript(processName, outputPath) {
27889
27909
  { stdio: ["ignore", "pipe", "pipe"], encoding: "utf8" }
27890
27910
  );
27891
27911
  } finally {
27892
- unlinkSync21(scriptPath);
27912
+ unlinkSync22(scriptPath);
27893
27913
  }
27894
27914
  }
27895
27915
  function screenshot(processName) {
@@ -28546,12 +28566,12 @@ import { basename as basename18 } from "path";
28546
28566
 
28547
28567
  // src/commands/sessions/daemon/worktree/deleteStrandedTree.ts
28548
28568
  import { existsSync as existsSync62 } from "fs";
28549
- import { join as join73 } from "path";
28569
+ import { join as join74 } from "path";
28550
28570
 
28551
28571
  // src/commands/sessions/daemon/worktree/deleteTreeDirectly.ts
28552
28572
  import { statSync as statSync12 } from "fs";
28553
28573
  import { rm as rm2 } from "fs/promises";
28554
- import { join as join72 } from "path";
28574
+ import { join as join73 } from "path";
28555
28575
  async function deleteTreeDirectly(clone, worktreePath, why) {
28556
28576
  if (holdsAGitDirectoryRatherThanALink(worktreePath)) {
28557
28577
  daemonLog(
@@ -28578,7 +28598,7 @@ async function deleteTreeDirectly(clone, worktreePath, why) {
28578
28598
  return true;
28579
28599
  }
28580
28600
  function holdsAGitDirectoryRatherThanALink(worktreePath) {
28581
- return statSync12(join72(worktreePath, ".git"), {
28601
+ return statSync12(join73(worktreePath, ".git"), {
28582
28602
  throwIfNoEntry: false
28583
28603
  })?.isDirectory() === true;
28584
28604
  }
@@ -28614,7 +28634,7 @@ async function deleteStrandedTree(clone, worktreePath, cause) {
28614
28634
  );
28615
28635
  }
28616
28636
  function strandedReason(worktreePath, cause) {
28617
- if (!existsSync62(join73(worktreePath, ".git")))
28637
+ if (!existsSync62(join74(worktreePath, ".git")))
28618
28638
  return "its .git link is already gone";
28619
28639
  if (/not a working tree|not a git repository/i.test(reason2(cause)))
28620
28640
  return "git no longer recognises it as a working tree";
@@ -31818,7 +31838,7 @@ var SessionManager = class {
31818
31838
  };
31819
31839
 
31820
31840
  // src/commands/sessions/daemon/startDaemonServer.ts
31821
- import { unlinkSync as unlinkSync23 } from "fs";
31841
+ import { unlinkSync as unlinkSync24 } from "fs";
31822
31842
  import * as net3 from "net";
31823
31843
 
31824
31844
  // src/commands/sessions/daemon/handleConnection.ts
@@ -32149,7 +32169,7 @@ function handleConnection(socket, manager) {
32149
32169
  }
32150
32170
 
32151
32171
  // src/commands/sessions/daemon/onListening.ts
32152
- import { unlinkSync as unlinkSync22, writeFileSync as writeFileSync43 } from "fs";
32172
+ import { unlinkSync as unlinkSync23, writeFileSync as writeFileSync43 } from "fs";
32153
32173
 
32154
32174
  // src/commands/sessions/daemon/startPidFileWatchdog.ts
32155
32175
  import { readFileSync as readFileSync52 } from "fs";
@@ -32192,12 +32212,12 @@ function onListening(manager, checkAutoExit) {
32192
32212
  function cleanupOwnedFiles() {
32193
32213
  if (!ownsPidFile()) return;
32194
32214
  try {
32195
- unlinkSync22(daemonPaths.pid);
32215
+ unlinkSync23(daemonPaths.pid);
32196
32216
  } catch {
32197
32217
  }
32198
32218
  if (process.platform !== "win32") {
32199
32219
  try {
32200
- unlinkSync22(daemonPaths.socket);
32220
+ unlinkSync23(daemonPaths.socket);
32201
32221
  } catch {
32202
32222
  }
32203
32223
  }
@@ -32244,7 +32264,7 @@ async function recoverFromAddrInUse(server, manager, checkAutoExit) {
32244
32264
  daemonLog("removing stale socket left by a crashed daemon");
32245
32265
  if (process.platform !== "win32") {
32246
32266
  try {
32247
- unlinkSync23(daemonPaths.socket);
32267
+ unlinkSync24(daemonPaths.socket);
32248
32268
  } catch {
32249
32269
  }
32250
32270
  }
@@ -32581,9 +32601,9 @@ function buildLimitsSegment(rateLimits) {
32581
32601
 
32582
32602
  // src/commands/readGitBranch.ts
32583
32603
  import { readFileSync as readFileSync54, statSync as statSync14 } from "fs";
32584
- import { isAbsolute as isAbsolute4, join as join75, resolve as resolve19 } from "path";
32604
+ import { isAbsolute as isAbsolute4, join as join76, resolve as resolve19 } from "path";
32585
32605
  function resolveGitDir(cwd) {
32586
- const dotGit = join75(cwd, ".git");
32606
+ const dotGit = join76(cwd, ".git");
32587
32607
  let stat3;
32588
32608
  try {
32589
32609
  stat3 = statSync14(dotGit);
@@ -32613,7 +32633,7 @@ function readGitBranch(cwd) {
32613
32633
  }
32614
32634
  let head;
32615
32635
  try {
32616
- head = readFileSync54(join75(gitDir, "HEAD"), "utf8");
32636
+ head = readFileSync54(join76(gitDir, "HEAD"), "utf8");
32617
32637
  } catch {
32618
32638
  return null;
32619
32639
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.487.0",
3
+ "version": "0.487.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {