@staff0rd/assist 0.817.0 → 0.818.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.817.0",
9
+ version: "0.818.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -7710,12 +7710,46 @@ function hasLocalChanges() {
7710
7710
  import {
7711
7711
  existsSync as existsSync26,
7712
7712
  mkdirSync as mkdirSync5,
7713
- readFileSync as readFileSync18,
7713
+ readFileSync as readFileSync19,
7714
7714
  unlinkSync as unlinkSync3,
7715
7715
  writeFileSync as writeFileSync16
7716
7716
  } from "fs";
7717
7717
  import { homedir as homedir7 } from "os";
7718
7718
  import { join as join29 } from "path";
7719
+
7720
+ // src/commands/backlog/bootedAt.ts
7721
+ import { uptime } from "os";
7722
+ function bootedAt() {
7723
+ return Date.now() - uptime() * 1e3;
7724
+ }
7725
+
7726
+ // src/commands/backlog/processStartedAt.ts
7727
+ import { readFileSync as readFileSync18 } from "fs";
7728
+ var clockTicksPerSecond = 100;
7729
+ function processStartedAt(pid) {
7730
+ try {
7731
+ const stat5 = readFileSync18(`/proc/${pid}/stat`, "utf8");
7732
+ const fields = stat5.slice(stat5.lastIndexOf(")") + 2).split(" ");
7733
+ const ticks = Number(fields[19]);
7734
+ if (!Number.isFinite(ticks)) return void 0;
7735
+ return bootedAt() + ticks / clockTicksPerSecond * 1e3;
7736
+ } catch {
7737
+ return void 0;
7738
+ }
7739
+ }
7740
+
7741
+ // src/commands/backlog/isStaleLock.ts
7742
+ var clockSlackMs = 5e3;
7743
+ function isStaleLock(pid, timestamp6) {
7744
+ if (typeof timestamp6 !== "string") return false;
7745
+ const lockedAt = Date.parse(timestamp6);
7746
+ if (Number.isNaN(lockedAt)) return false;
7747
+ if (lockedAt < bootedAt() - clockSlackMs) return true;
7748
+ const startedAt = processStartedAt(pid);
7749
+ return startedAt !== void 0 && startedAt > lockedAt + clockSlackMs;
7750
+ }
7751
+
7752
+ // src/commands/backlog/acquireLock.ts
7719
7753
  function getLocksDir() {
7720
7754
  return join29(homedir7(), ".assist", "locks");
7721
7755
  }
@@ -7734,9 +7768,10 @@ function foreignLockHolder(itemId2) {
7734
7768
  const lockPath = getLockPath(itemId2);
7735
7769
  if (!existsSync26(lockPath)) return null;
7736
7770
  try {
7737
- const lock2 = JSON.parse(readFileSync18(lockPath, "utf8"));
7771
+ const lock2 = JSON.parse(readFileSync19(lockPath, "utf8"));
7738
7772
  if (typeof lock2.pid !== "number" || lock2.pid === process.pid) return null;
7739
7773
  if (!isProcessAlive(lock2.pid)) return null;
7774
+ if (isStaleLock(lock2.pid, lock2.timestamp)) return null;
7740
7775
  return { pid: lock2.pid, timestamp: lock2.timestamp };
7741
7776
  } catch {
7742
7777
  return null;
@@ -8567,7 +8602,7 @@ function spawnHarness(harness, prompt, options2 = {}) {
8567
8602
  import { existsSync as existsSync30, unwatchFile, watchFile } from "fs";
8568
8603
 
8569
8604
  // src/commands/backlog/readSignal.ts
8570
- import { existsSync as existsSync29, readFileSync as readFileSync20 } from "fs";
8605
+ import { existsSync as existsSync29, readFileSync as readFileSync21 } from "fs";
8571
8606
 
8572
8607
  // src/commands/backlog/writeSignal.ts
8573
8608
  import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync20 } from "fs";
@@ -8579,7 +8614,7 @@ import chalk66 from "chalk";
8579
8614
  import {
8580
8615
  existsSync as existsSync28,
8581
8616
  mkdirSync as mkdirSync8,
8582
- readFileSync as readFileSync19,
8617
+ readFileSync as readFileSync20,
8583
8618
  rmSync,
8584
8619
  writeFileSync as writeFileSync19
8585
8620
  } from "fs";
@@ -8599,7 +8634,7 @@ function readSignalOwner(itemId2) {
8599
8634
  const path108 = getOwnerPath(itemId2);
8600
8635
  if (!existsSync28(path108)) return void 0;
8601
8636
  try {
8602
- const parsed = JSON.parse(readFileSync19(path108, "utf8"));
8637
+ const parsed = JSON.parse(readFileSync20(path108, "utf8"));
8603
8638
  return parsed.sessionId;
8604
8639
  } catch {
8605
8640
  return void 0;
@@ -8657,7 +8692,7 @@ function readSignal() {
8657
8692
  const path108 = getSignalPath();
8658
8693
  if (!path108 || !existsSync29(path108)) return void 0;
8659
8694
  try {
8660
- return JSON.parse(readFileSync20(path108, "utf8"));
8695
+ return JSON.parse(readFileSync21(path108, "utf8"));
8661
8696
  } catch {
8662
8697
  return void 0;
8663
8698
  }
@@ -8833,7 +8868,7 @@ async function persistPhaseSessionId(itemId2, phaseIdx, claudeSessionId) {
8833
8868
  }
8834
8869
 
8835
8870
  // src/shared/emitActivity.ts
8836
- import { mkdirSync as mkdirSync10, readFileSync as readFileSync21, rmSync as rmSync2, writeFileSync as writeFileSync21 } from "fs";
8871
+ import { mkdirSync as mkdirSync10, readFileSync as readFileSync22, rmSync as rmSync2, writeFileSync as writeFileSync21 } from "fs";
8837
8872
  import { homedir as homedir12 } from "os";
8838
8873
  import { dirname as dirname18, join as join34 } from "path";
8839
8874
  import { z as z8 } from "zod";
@@ -8862,7 +8897,7 @@ function emitActivity(activity2) {
8862
8897
  }
8863
8898
  function readActivity(path108) {
8864
8899
  try {
8865
- return JSON.parse(readFileSync21(path108, "utf8"));
8900
+ return JSON.parse(readFileSync22(path108, "utf8"));
8866
8901
  } catch {
8867
8902
  return void 0;
8868
8903
  }
@@ -11696,7 +11731,7 @@ function attachSessionSocket(server, ctx) {
11696
11731
 
11697
11732
  // src/shared/createBundleHandler.ts
11698
11733
  import { createHash } from "crypto";
11699
- import { readFileSync as readFileSync22, statSync as statSync5 } from "fs";
11734
+ import { readFileSync as readFileSync23, statSync as statSync5 } from "fs";
11700
11735
  import { dirname as dirname21, join as join40 } from "path";
11701
11736
  import { fileURLToPath as fileURLToPath4 } from "url";
11702
11737
  function createBundleHandler(importMetaUrl, bundlePath, contentType = "application/javascript") {
@@ -11705,7 +11740,7 @@ function createBundleHandler(importMetaUrl, bundlePath, contentType = "applicati
11705
11740
  return (req, res) => {
11706
11741
  const mtimeMs = statSync5(file).mtimeMs;
11707
11742
  if (cache6?.mtimeMs !== mtimeMs) {
11708
- const body = readFileSync22(file, "utf8");
11743
+ const body = readFileSync23(file, "utf8");
11709
11744
  const etag = `"${createHash("sha256").update(body).digest("hex").slice(0, 16)}"`;
11710
11745
  cache6 = { body, etag, mtimeMs };
11711
11746
  }
@@ -13816,7 +13851,7 @@ function handleServerRuns(req, res) {
13816
13851
 
13817
13852
  // src/commands/sessions/web/getReviewSynthesis.ts
13818
13853
  import { execFile as execFile6 } from "child_process";
13819
- import { readFileSync as readFileSync23 } from "fs";
13854
+ import { readFileSync as readFileSync24 } from "fs";
13820
13855
  import { homedir as homedir15 } from "os";
13821
13856
  import { basename as basename12, join as join42 } from "path";
13822
13857
  import { promisify as promisify5 } from "util";
@@ -13864,7 +13899,7 @@ async function getReviewSynthesis(req, res) {
13864
13899
  respondJson(res, 404, { error: "No synthesis found" });
13865
13900
  return;
13866
13901
  }
13867
- respondJson(res, 200, { synthesis: readFileSync23(path108, "utf8") });
13902
+ respondJson(res, 200, { synthesis: readFileSync24(path108, "utf8") });
13868
13903
  } catch {
13869
13904
  respondJson(res, 404, { error: "No synthesis found" });
13870
13905
  }
@@ -15152,7 +15187,7 @@ async function nextPickup(req, res) {
15152
15187
  import path29 from "path";
15153
15188
 
15154
15189
  // src/commands/rules/readScopedRules.ts
15155
- import { existsSync as existsSync37, readFileSync as readFileSync24 } from "fs";
15190
+ import { existsSync as existsSync37, readFileSync as readFileSync25 } from "fs";
15156
15191
  import path28 from "path";
15157
15192
 
15158
15193
  // src/commands/rules/rulesSectionRange.ts
@@ -15224,7 +15259,7 @@ function scopedClaudeFiles(target) {
15224
15259
  }
15225
15260
  function readScopedRules(target) {
15226
15261
  return scopedClaudeFiles(target).flatMap(
15227
- (source) => parseRulesSection(readFileSync24(source, "utf8")).map((rule) => ({
15262
+ (source) => parseRulesSection(readFileSync25(source, "utf8")).map((rule) => ({
15228
15263
  ...rule,
15229
15264
  source
15230
15265
  }))
@@ -18095,7 +18130,7 @@ async function writeFileContent(req, res) {
18095
18130
 
18096
18131
  // src/commands/sessions/web/createCssHandler.ts
18097
18132
  import { createHash as createHash3 } from "crypto";
18098
- import { readFileSync as readFileSync25 } from "fs";
18133
+ import { readFileSync as readFileSync26 } from "fs";
18099
18134
  import { createRequire } from "module";
18100
18135
  var require2 = createRequire(import.meta.url);
18101
18136
  function createCssHandler(packageEntry) {
@@ -18103,7 +18138,7 @@ function createCssHandler(packageEntry) {
18103
18138
  return (req, res) => {
18104
18139
  if (!cache6) {
18105
18140
  const resolved = require2.resolve(packageEntry);
18106
- const body = readFileSync25(resolved, "utf8");
18141
+ const body = readFileSync26(resolved, "utf8");
18107
18142
  const etag = `"${createHash3("sha256").update(body).digest("hex").slice(0, 16)}"`;
18108
18143
  cache6 = { body, etag };
18109
18144
  }
@@ -19253,7 +19288,7 @@ function tokenize(command) {
19253
19288
  }
19254
19289
 
19255
19290
  // src/commands/cliHook/isGhGraphqlIssueMutation.ts
19256
- import { readFileSync as readFileSync26 } from "fs";
19291
+ import { readFileSync as readFileSync27 } from "fs";
19257
19292
  var ISSUE_MUTATION = /\bmutation\b[\s\S]*(?:issue|comment|label|assign|reaction|milestone)/i;
19258
19293
  var FIELD_FLAGS = ["-f", "-F", "--field", "--raw-field"];
19259
19294
  function isGhGraphqlIssueMutation(args, command) {
@@ -19289,7 +19324,7 @@ function readSourceOrCommandText(source, command) {
19289
19324
  const path108 = source.slice(1);
19290
19325
  if (path108 === "-") return command;
19291
19326
  try {
19292
- return readFileSync26(path108, "utf8");
19327
+ return readFileSync27(path108, "utf8");
19293
19328
  } catch {
19294
19329
  return command;
19295
19330
  }
@@ -19659,7 +19694,7 @@ function extractGraphqlQuery(args) {
19659
19694
  }
19660
19695
 
19661
19696
  // src/shared/loadCliReads.ts
19662
- import { existsSync as existsSync42, readFileSync as readFileSync27, writeFileSync as writeFileSync23 } from "fs";
19697
+ import { existsSync as existsSync42, readFileSync as readFileSync28, writeFileSync as writeFileSync23 } from "fs";
19663
19698
  import { dirname as dirname26, resolve as resolve16 } from "path";
19664
19699
  import { fileURLToPath as fileURLToPath5 } from "url";
19665
19700
  var __filename3 = fileURLToPath5(import.meta.url);
@@ -19669,7 +19704,7 @@ function packageRoot() {
19669
19704
  }
19670
19705
  function readLines(path108) {
19671
19706
  if (!existsSync42(path108)) return [];
19672
- return readFileSync27(path108, "utf8").split("\n").filter((line) => line.trim() !== "");
19707
+ return readFileSync28(path108, "utf8").split("\n").filter((line) => line.trim() !== "");
19673
19708
  }
19674
19709
  var cachedReads;
19675
19710
  var cachedWrites;
@@ -19715,7 +19750,7 @@ function findCliWrite(command) {
19715
19750
  }
19716
19751
 
19717
19752
  // src/shared/readSettingsPerms.ts
19718
- import { existsSync as existsSync43, readFileSync as readFileSync28 } from "fs";
19753
+ import { existsSync as existsSync43, readFileSync as readFileSync29 } from "fs";
19719
19754
  import { homedir as homedir17 } from "os";
19720
19755
  import { join as join48 } from "path";
19721
19756
  function readSettingsPerms(key) {
@@ -19733,7 +19768,7 @@ function readSettingsPerms(key) {
19733
19768
  function readPermissionArray(filePath, key) {
19734
19769
  if (!existsSync43(filePath)) return [];
19735
19770
  try {
19736
- const data = JSON.parse(readFileSync28(filePath, "utf8"));
19771
+ const data = JSON.parse(readFileSync29(filePath, "utf8"));
19737
19772
  const arr = data?.permissions?.[key];
19738
19773
  return Array.isArray(arr) ? arr.filter((e) => typeof e === "string") : [];
19739
19774
  } catch {
@@ -20088,7 +20123,7 @@ ${reasons.join("\n")}`);
20088
20123
  }
20089
20124
 
20090
20125
  // src/commands/permitCliReads.ts
20091
- import { existsSync as existsSync44, mkdirSync as mkdirSync14, readFileSync as readFileSync29, writeFileSync as writeFileSync24 } from "fs";
20126
+ import { existsSync as existsSync44, mkdirSync as mkdirSync14, readFileSync as readFileSync30, writeFileSync as writeFileSync24 } from "fs";
20092
20127
  import { homedir as homedir19 } from "os";
20093
20128
  import { join as join50 } from "path";
20094
20129
 
@@ -20358,7 +20393,7 @@ function logPath(cli) {
20358
20393
  function readCache(cli) {
20359
20394
  const path108 = logPath(cli);
20360
20395
  if (!existsSync44(path108)) return void 0;
20361
- return readFileSync29(path108, "utf8");
20396
+ return readFileSync30(path108, "utf8");
20362
20397
  }
20363
20398
  function writeCache(cli, output) {
20364
20399
  const dir = join50(homedir19(), ".assist");
@@ -20492,7 +20527,7 @@ function registerCliHook(program2) {
20492
20527
  }
20493
20528
 
20494
20529
  // src/commands/codeComment/codeCommentConfirm.ts
20495
- import { existsSync as existsSync46, readFileSync as readFileSync31, unlinkSync as unlinkSync8, writeFileSync as writeFileSync25 } from "fs";
20530
+ import { existsSync as existsSync46, readFileSync as readFileSync32, unlinkSync as unlinkSync8, writeFileSync as writeFileSync25 } from "fs";
20496
20531
  import chalk121 from "chalk";
20497
20532
 
20498
20533
  // src/shared/isHashCommentFile.ts
@@ -20557,12 +20592,12 @@ function sweepRestrictedDir(dir = getRestrictedDir()) {
20557
20592
  }
20558
20593
 
20559
20594
  // src/commands/codeComment/readPinState.ts
20560
- import { existsSync as existsSync45, readFileSync as readFileSync30 } from "fs";
20595
+ import { existsSync as existsSync45, readFileSync as readFileSync31 } from "fs";
20561
20596
  function readPinState(pin2) {
20562
20597
  const path108 = getPinStatePath(pin2);
20563
20598
  if (!existsSync45(path108)) return void 0;
20564
20599
  try {
20565
- const state = JSON.parse(readFileSync30(path108, "utf8"));
20600
+ const state = JSON.parse(readFileSync31(path108, "utf8"));
20566
20601
  if (state.pin !== pin2) return void 0;
20567
20602
  return state;
20568
20603
  } catch {
@@ -20584,7 +20619,7 @@ function codeCommentConfirm(pin2) {
20584
20619
  process.exitCode = 1;
20585
20620
  return;
20586
20621
  }
20587
- const original = readFileSync31(state.file, "utf8");
20622
+ const original = readFileSync32(state.file, "utf8");
20588
20623
  const lines2 = original.split("\n");
20589
20624
  const index2 = state.line - 1;
20590
20625
  if (index2 > lines2.length) {
@@ -22699,12 +22734,12 @@ function getMigrationApprovalPath(migrationId) {
22699
22734
  }
22700
22735
 
22701
22736
  // src/commands/dbMigration/readMigrationPinState.ts
22702
- import { existsSync as existsSync50, readFileSync as readFileSync32 } from "fs";
22737
+ import { existsSync as existsSync50, readFileSync as readFileSync33 } from "fs";
22703
22738
  function readMigrationPinState(pin2) {
22704
22739
  const path108 = getMigrationPinPath(pin2);
22705
22740
  if (!existsSync50(path108)) return void 0;
22706
22741
  try {
22707
- const state = JSON.parse(readFileSync32(path108, "utf8"));
22742
+ const state = JSON.parse(readFileSync33(path108, "utf8"));
22708
22743
  if (state.pin !== pin2) return void 0;
22709
22744
  if (!Number.isInteger(state.migrationId)) return void 0;
22710
22745
  return state;
@@ -22791,7 +22826,7 @@ function registerDbMigration(parent) {
22791
22826
  }
22792
22827
 
22793
22828
  // src/commands/deploy/redirect.ts
22794
- import { existsSync as existsSync51, readFileSync as readFileSync33, writeFileSync as writeFileSync29 } from "fs";
22829
+ import { existsSync as existsSync51, readFileSync as readFileSync34, writeFileSync as writeFileSync29 } from "fs";
22795
22830
  import chalk149 from "chalk";
22796
22831
  var TRAILING_SLASH_SCRIPT = ` <script>
22797
22832
  if (!window.location.pathname.endsWith('/')) {
@@ -22804,7 +22839,7 @@ function redirect() {
22804
22839
  console.log(chalk149.yellow("No index.html found"));
22805
22840
  return;
22806
22841
  }
22807
- const content = readFileSync33(indexPath, "utf8");
22842
+ const content = readFileSync34(indexPath, "utf8");
22808
22843
  if (content.includes("window.location.pathname.endsWith('/')")) {
22809
22844
  console.log(chalk149.dim("Trailing slash script already present"));
22810
22845
  return;
@@ -22847,7 +22882,7 @@ import { execSync as execSync32 } from "child_process";
22847
22882
  import chalk150 from "chalk";
22848
22883
 
22849
22884
  // src/shared/getRepoName.ts
22850
- import { existsSync as existsSync52, readFileSync as readFileSync34 } from "fs";
22885
+ import { existsSync as existsSync52, readFileSync as readFileSync35 } from "fs";
22851
22886
  import { basename as basename16, join as join63 } from "path";
22852
22887
  function getRepoName() {
22853
22888
  const config = loadConfig();
@@ -22857,7 +22892,7 @@ function getRepoName() {
22857
22892
  const packageJsonPath = join63(process.cwd(), "package.json");
22858
22893
  if (existsSync52(packageJsonPath)) {
22859
22894
  try {
22860
- const content = readFileSync34(packageJsonPath, "utf8");
22895
+ const content = readFileSync35(packageJsonPath, "utf8");
22861
22896
  const pkg = JSON.parse(content);
22862
22897
  if (pkg.name) {
22863
22898
  return pkg.name;
@@ -22869,7 +22904,7 @@ function getRepoName() {
22869
22904
  }
22870
22905
 
22871
22906
  // src/commands/devlog/loadDevlogEntries.ts
22872
- import { readdirSync as readdirSync7, readFileSync as readFileSync35 } from "fs";
22907
+ import { readdirSync as readdirSync7, readFileSync as readFileSync36 } from "fs";
22873
22908
  import { join as join64 } from "path";
22874
22909
  var DEVLOG_DIR = join64(BLOG_REPO_ROOT, "src/content/devlog");
22875
22910
  function extractFrontmatter(content) {
@@ -22899,7 +22934,7 @@ function readDevlogFiles(callback) {
22899
22934
  try {
22900
22935
  const files = readdirSync7(DEVLOG_DIR).filter((f) => f.endsWith(".md"));
22901
22936
  for (const file of files) {
22902
- const content = readFileSync35(join64(DEVLOG_DIR, file), "utf8");
22937
+ const content = readFileSync36(join64(DEVLOG_DIR, file), "utf8");
22903
22938
  const parsed = parseFrontmatter(content, file);
22904
22939
  if (parsed) callback(parsed);
22905
22940
  }
@@ -23412,11 +23447,11 @@ async function checkBuildLocksCommand() {
23412
23447
  }
23413
23448
 
23414
23449
  // src/commands/dotnet/buildTree.ts
23415
- import { readFileSync as readFileSync36 } from "fs";
23450
+ import { readFileSync as readFileSync37 } from "fs";
23416
23451
  import path36 from "path";
23417
23452
  var PROJECT_REF_RE = /<ProjectReference\s+Include="([^"]+)"/g;
23418
23453
  function getProjectRefs(csprojPath) {
23419
- const content = readFileSync36(csprojPath, "utf8");
23454
+ const content = readFileSync37(csprojPath, "utf8");
23420
23455
  const refs = [];
23421
23456
  for (const match of content.matchAll(PROJECT_REF_RE)) {
23422
23457
  refs.push(match[1].replace(/\\/g, "/"));
@@ -23433,7 +23468,7 @@ function buildTree(csprojPath, repoRoot2, visited = /* @__PURE__ */ new Set()) {
23433
23468
  for (const ref of getProjectRefs(abs)) {
23434
23469
  const childAbs = path36.resolve(dir, ref);
23435
23470
  try {
23436
- readFileSync36(childAbs);
23471
+ readFileSync37(childAbs);
23437
23472
  node.children.push(buildTree(childAbs, repoRoot2, visited));
23438
23473
  } catch {
23439
23474
  node.children.push({
@@ -23458,7 +23493,7 @@ function collectAllDeps(node) {
23458
23493
  }
23459
23494
 
23460
23495
  // src/commands/dotnet/findContainingSolutions.ts
23461
- import { readdirSync as readdirSync9, readFileSync as readFileSync37, statSync as statSync9 } from "fs";
23496
+ import { readdirSync as readdirSync9, readFileSync as readFileSync38, statSync as statSync9 } from "fs";
23462
23497
  import path37 from "path";
23463
23498
  function findSlnFiles(dir, maxDepth, depth = 0) {
23464
23499
  if (depth > maxDepth) return [];
@@ -23493,7 +23528,7 @@ function findContainingSolutions(csprojPath, repoRoot2) {
23493
23528
  const pattern2 = new RegExp(`[\\\\"/]${escapeRegex(csprojBasename)}"`);
23494
23529
  for (const sln of slnFiles) {
23495
23530
  try {
23496
- const content = readFileSync37(sln, "utf8");
23531
+ const content = readFileSync38(sln, "utf8");
23497
23532
  if (pattern2.test(content)) {
23498
23533
  matches.push(path37.relative(repoRoot2, sln));
23499
23534
  }
@@ -23811,7 +23846,7 @@ function parseInspectReport(json) {
23811
23846
 
23812
23847
  // src/commands/dotnet/runInspectCode.ts
23813
23848
  import { execSync as execSync36 } from "child_process";
23814
- import { existsSync as existsSync55, readFileSync as readFileSync38, unlinkSync as unlinkSync10 } from "fs";
23849
+ import { existsSync as existsSync55, readFileSync as readFileSync39, unlinkSync as unlinkSync10 } from "fs";
23815
23850
  import { tmpdir as tmpdir4 } from "os";
23816
23851
  import path40 from "path";
23817
23852
  import chalk164 from "chalk";
@@ -23846,7 +23881,7 @@ function runInspectCode(slnPath, include, swea) {
23846
23881
  console.error(chalk164.red("Report file not generated"));
23847
23882
  process.exit(1);
23848
23883
  }
23849
- const xml = readFileSync38(reportPath, "utf8");
23884
+ const xml = readFileSync39(reportPath, "utf8");
23850
23885
  unlinkSync10(reportPath);
23851
23886
  return xml;
23852
23887
  }
@@ -26201,14 +26236,14 @@ function fetchIssueToWorkingFile(number, repo) {
26201
26236
  }
26202
26237
 
26203
26238
  // src/commands/github/issue/resumeIssueBody.ts
26204
- import { existsSync as existsSync57, readFileSync as readFileSync39 } from "fs";
26239
+ import { existsSync as existsSync57, readFileSync as readFileSync40 } from "fs";
26205
26240
  function resumeIssueBody(slug2, number, updatedAt) {
26206
26241
  const { bodyPath, metaPath } = issueWorkingFile(slug2, number);
26207
26242
  if (!existsSync57(bodyPath) || !existsSync57(metaPath)) return void 0;
26208
26243
  try {
26209
- const meta = JSON.parse(readFileSync39(metaPath, "utf8"));
26244
+ const meta = JSON.parse(readFileSync40(metaPath, "utf8"));
26210
26245
  if (meta.updatedAt !== updatedAt) return void 0;
26211
- return readFileSync39(bodyPath, "utf8");
26246
+ return readFileSync40(bodyPath, "utf8");
26212
26247
  } catch {
26213
26248
  return void 0;
26214
26249
  }
@@ -27717,7 +27752,7 @@ import { resolve as resolve20 } from "path";
27717
27752
  import chalk179 from "chalk";
27718
27753
 
27719
27754
  // src/commands/mermaid/exportFile.ts
27720
- import { readFileSync as readFileSync40, writeFileSync as writeFileSync33 } from "fs";
27755
+ import { readFileSync as readFileSync41, writeFileSync as writeFileSync33 } from "fs";
27721
27756
  import { basename as basename21, extname as extname4, resolve as resolve19 } from "path";
27722
27757
  import chalk178 from "chalk";
27723
27758
 
@@ -27743,7 +27778,7 @@ async function renderBlock(krokiUrl, source) {
27743
27778
 
27744
27779
  // src/commands/mermaid/exportFile.ts
27745
27780
  async function exportFile(file, outDir, krokiUrl, onlyIndex) {
27746
- const content = readFileSync40(file, "utf8");
27781
+ const content = readFileSync41(file, "utf8");
27747
27782
  const blocks = extractMermaidBlocks(content);
27748
27783
  const stem = basename21(file, extname4(file));
27749
27784
  if (onlyIndex !== void 0) {
@@ -27955,14 +27990,14 @@ function applyIgnore(texts, ignore3) {
27955
27990
  }
27956
27991
 
27957
27992
  // src/commands/miro/readIgnoreList.ts
27958
- import { existsSync as existsSync62, readFileSync as readFileSync41 } from "fs";
27993
+ import { existsSync as existsSync62, readFileSync as readFileSync42 } from "fs";
27959
27994
  import { parse as parse2 } from "yaml";
27960
27995
  function readIgnoreList(file) {
27961
27996
  if (!existsSync62(file))
27962
27997
  throw new MiroExtractError(
27963
27998
  `No ignore file at ${file}. Write a YAML list of the box texts to drop, or omit --ignore.`
27964
27999
  );
27965
- const parsed = parse2(readFileSync41(file, "utf8"));
28000
+ const parsed = parse2(readFileSync42(file, "utf8"));
27966
28001
  if (parsed === null || parsed === void 0) return [];
27967
28002
  if (!Array.isArray(parsed) || parsed.some((entry) => typeof entry !== "string"))
27968
28003
  throw new MiroExtractError(
@@ -28142,7 +28177,7 @@ async function pickAnchors(sessionId, items2) {
28142
28177
  }
28143
28178
 
28144
28179
  // src/commands/miro/readMiroItems.ts
28145
- import { readFileSync as readFileSync42 } from "fs";
28180
+ import { readFileSync as readFileSync43 } from "fs";
28146
28181
  function tryParse(text18) {
28147
28182
  try {
28148
28183
  return JSON.parse(text18);
@@ -28171,7 +28206,7 @@ function parsePages(raw, file) {
28171
28206
  return Array.isArray(parsed) ? parsed.map(toPage) : [toPage(parsed)];
28172
28207
  }
28173
28208
  function readMiroItems(file) {
28174
- const items2 = parsePages(readFileSync42(file, "utf8"), file).flatMap(
28209
+ const items2 = parsePages(readFileSync43(file, "utf8"), file).flatMap(
28175
28210
  (page) => page.data ?? []
28176
28211
  );
28177
28212
  if (items2.length === 0)
@@ -28567,7 +28602,7 @@ import { join as join77 } from "path";
28567
28602
  import chalk184 from "chalk";
28568
28603
 
28569
28604
  // src/commands/netcap/extractPostsFromCapture.ts
28570
- import { readFileSync as readFileSync43 } from "fs";
28605
+ import { readFileSync as readFileSync44 } from "fs";
28571
28606
 
28572
28607
  // src/commands/netcap/parseRscRows.ts
28573
28608
  var isRscRef = (v) => typeof v === "string" && /^\$[0-9a-fL@]/.test(v);
@@ -28963,7 +28998,7 @@ function extractVoyagerPosts(body) {
28963
28998
 
28964
28999
  // src/commands/netcap/extractPostsFromCapture.ts
28965
29000
  function captureEntries(captureFile) {
28966
- const lines2 = readFileSync43(captureFile, "utf8").split("\n").filter(Boolean);
29001
+ const lines2 = readFileSync44(captureFile, "utf8").split("\n").filter(Boolean);
28967
29002
  const entries = [];
28968
29003
  for (const line of lines2) {
28969
29004
  let entry;
@@ -29374,7 +29409,7 @@ import { tmpdir as tmpdir6 } from "os";
29374
29409
  import { join as join79 } from "path";
29375
29410
 
29376
29411
  // src/commands/prs/loadCommentsCache.ts
29377
- import { existsSync as existsSync63, readFileSync as readFileSync44, unlinkSync as unlinkSync13 } from "fs";
29412
+ import { existsSync as existsSync63, readFileSync as readFileSync45, unlinkSync as unlinkSync13 } from "fs";
29378
29413
  import { parse as parse3 } from "yaml";
29379
29414
 
29380
29415
  // src/commands/prs/commentsCachePath.ts
@@ -29397,7 +29432,7 @@ function loadCommentsCache(org, repo, prNumber) {
29397
29432
  if (!existsSync63(cachePath)) {
29398
29433
  return null;
29399
29434
  }
29400
- const content = readFileSync44(cachePath, "utf8");
29435
+ const content = readFileSync45(cachePath, "utf8");
29401
29436
  return parse3(content);
29402
29437
  }
29403
29438
  function deleteCommentsCache(org, repo, prNumber) {
@@ -31055,7 +31090,7 @@ function registerPrsStatus(prsCommand) {
31055
31090
  }
31056
31091
 
31057
31092
  // src/commands/readTime/readTime.ts
31058
- import { readFileSync as readFileSync45 } from "fs";
31093
+ import { readFileSync as readFileSync46 } from "fs";
31059
31094
 
31060
31095
  // src/commands/readTime/countReadingWords.ts
31061
31096
  var FENCE_PATTERN = /^\s*(```|~~~)/;
@@ -31216,7 +31251,7 @@ async function loadBody(target) {
31216
31251
  }
31217
31252
  function readDraftFile(path108) {
31218
31253
  try {
31219
- return readFileSync45(path108, "utf8");
31254
+ return readFileSync46(path108, "utf8");
31220
31255
  } catch {
31221
31256
  console.error(`Error: Could not read \`${path108}\`.`);
31222
31257
  console.error(
@@ -31714,10 +31749,10 @@ function checkStreamGraph(streams) {
31714
31749
  }
31715
31750
 
31716
31751
  // src/commands/releases/readStreamsInput.ts
31717
- import { readFileSync as readFileSync46 } from "fs";
31752
+ import { readFileSync as readFileSync47 } from "fs";
31718
31753
  import { parse as parse4 } from "yaml";
31719
31754
  function readSource2(source) {
31720
- return readFileSync46(source === "-" ? 0 : source, "utf8");
31755
+ return readFileSync47(source === "-" ? 0 : source, "utf8");
31721
31756
  }
31722
31757
  function readStreamsInput(source) {
31723
31758
  let parsed;
@@ -32540,7 +32575,7 @@ function buildLimitsSegment(rateLimits) {
32540
32575
  }
32541
32576
 
32542
32577
  // src/commands/readGitBranch.ts
32543
- import { readFileSync as readFileSync47, statSync as statSync11 } from "fs";
32578
+ import { readFileSync as readFileSync48, statSync as statSync11 } from "fs";
32544
32579
  import { isAbsolute as isAbsolute6, join as join83, resolve as resolve25 } from "path";
32545
32580
  function resolveGitDir(cwd) {
32546
32581
  const dotGit = join83(cwd, ".git");
@@ -32555,7 +32590,7 @@ function resolveGitDir(cwd) {
32555
32590
  }
32556
32591
  let contents;
32557
32592
  try {
32558
- contents = readFileSync47(dotGit, "utf8");
32593
+ contents = readFileSync48(dotGit, "utf8");
32559
32594
  } catch {
32560
32595
  return null;
32561
32596
  }
@@ -32573,7 +32608,7 @@ function readGitBranch(cwd) {
32573
32608
  }
32574
32609
  let head;
32575
32610
  try {
32576
- head = readFileSync47(join83(gitDir, "HEAD"), "utf8");
32611
+ head = readFileSync48(join83(gitDir, "HEAD"), "utf8");
32577
32612
  } catch {
32578
32613
  return null;
32579
32614
  }
@@ -35342,7 +35377,7 @@ function capHighLevelTestSources(files) {
35342
35377
  }
35343
35378
 
35344
35379
  // src/commands/review/highLevel/collectHighLevelTests.ts
35345
- import { existsSync as existsSync65, readFileSync as readFileSync48 } from "fs";
35380
+ import { existsSync as existsSync65, readFileSync as readFileSync49 } from "fs";
35346
35381
  import { join as join84 } from "path";
35347
35382
  import { minimatch as minimatch6 } from "minimatch";
35348
35383
 
@@ -35462,7 +35497,7 @@ function testFile(file, repoRoot2) {
35462
35497
  const changed = file.patch === void 0 ? void 0 : patchAddedLines(file.patch);
35463
35498
  const tests = extractTestHierarchy(
35464
35499
  file.path,
35465
- readFileSync48(absolute2, "utf8"),
35500
+ readFileSync49(absolute2, "utf8"),
35466
35501
  changed
35467
35502
  );
35468
35503
  if (tests.length === 0) return [];
@@ -35690,7 +35725,7 @@ function fetchHighLevelPr(prNumber, repo) {
35690
35725
  }
35691
35726
 
35692
35727
  // src/commands/review/highLevel/loadHighLevelReview.ts
35693
- import { existsSync as existsSync66, readFileSync as readFileSync49 } from "fs";
35728
+ import { existsSync as existsSync66, readFileSync as readFileSync50 } from "fs";
35694
35729
 
35695
35730
  // src/commands/review/highLevel/highLevelReviewPath.ts
35696
35731
  import { join as join85 } from "path";
@@ -35711,7 +35746,7 @@ function loadHighLevelReview(repo, headRef, headSha) {
35711
35746
  const path108 = highLevelReviewPath(repo, headRef, headSha);
35712
35747
  if (!existsSync66(path108)) return void 0;
35713
35748
  try {
35714
- return JSON.parse(readFileSync49(path108, "utf8"));
35749
+ return JSON.parse(readFileSync50(path108, "utf8"));
35715
35750
  } catch {
35716
35751
  return void 0;
35717
35752
  }
@@ -36096,7 +36131,7 @@ async function runHighLevelReview(number, options2 = {}) {
36096
36131
  }
36097
36132
 
36098
36133
  // src/commands/review/ci/writeJobSummary.ts
36099
- import { appendFileSync as appendFileSync2, readFileSync as readFileSync50 } from "fs";
36134
+ import { appendFileSync as appendFileSync2, readFileSync as readFileSync51 } from "fs";
36100
36135
 
36101
36136
  // src/commands/review/carriedUnanchoredFindings.ts
36102
36137
  function carriedUnanchoredFindings(unanchored) {
@@ -36427,14 +36462,14 @@ function selectPostableFindings(markdown, prInfo) {
36427
36462
  // src/commands/review/ci/writeJobSummary.ts
36428
36463
  function writeJobSummary(synthesisPath, prInfo, summaryPath) {
36429
36464
  if (!summaryPath) return;
36430
- const markdown = readFileSync50(synthesisPath, "utf8");
36465
+ const markdown = readFileSync51(synthesisPath, "utf8");
36431
36466
  const { unanchored } = selectPostableFindings(markdown, prInfo);
36432
36467
  appendFileSync2(summaryPath, `${buildReviewSummary(markdown, unanchored)}
36433
36468
  `);
36434
36469
  }
36435
36470
 
36436
36471
  // src/commands/review/postReviewToPr.ts
36437
- import { readFileSync as readFileSync51 } from "fs";
36472
+ import { readFileSync as readFileSync52 } from "fs";
36438
36473
 
36439
36474
  // src/commands/review/chainAddressComments.ts
36440
36475
  function chainAddressComments(prNumber, announce) {
@@ -36588,7 +36623,7 @@ async function confirmPost(prNumber, work, options2) {
36588
36623
  return promptConfirm(`Post ${work} to PR #${prNumber}?`, false);
36589
36624
  }
36590
36625
  async function postFindingsToPr(prInfo, synthesisPath, options2) {
36591
- const markdown = readFileSync51(synthesisPath, "utf8");
36626
+ const markdown = readFileSync52(synthesisPath, "utf8");
36592
36627
  const { inDiff, unanchored } = selectPostableFindings(markdown, prInfo);
36593
36628
  const carried = carriedUnanchoredFindings(unanchored);
36594
36629
  if (inDiff.length === 0 && carried.length === 0) return NOTHING_POSTED;
@@ -37605,7 +37640,7 @@ async function runReviewers(reviewDir, claudePath, codexPath, stdinPrompt, optio
37605
37640
  }
37606
37641
 
37607
37642
  // src/commands/review/synthesise.ts
37608
- import { readFileSync as readFileSync52 } from "fs";
37643
+ import { readFileSync as readFileSync53 } from "fs";
37609
37644
 
37610
37645
  // src/commands/review/buildSynthesisStdin.ts
37611
37646
  var SYNTHESIS_PROMPT = `You are consolidating two independent code reviews of the same change. The original review request is in request.md. The two reviews are in claude.md and codex.md in the current working directory.
@@ -37674,7 +37709,7 @@ Files:
37674
37709
 
37675
37710
  // src/commands/review/synthesise.ts
37676
37711
  function printSummary2(synthesisPath) {
37677
- const markdown = readFileSync52(synthesisPath, "utf8");
37712
+ const markdown = readFileSync53(synthesisPath, "utf8");
37678
37713
  console.log("");
37679
37714
  console.log(buildReviewSummary(markdown));
37680
37715
  console.log("");
@@ -38294,7 +38329,7 @@ function registerReview(program2) {
38294
38329
  }
38295
38330
 
38296
38331
  // src/commands/rules/addRule.ts
38297
- import { existsSync as existsSync72, readFileSync as readFileSync56, writeFileSync as writeFileSync44 } from "fs";
38332
+ import { existsSync as existsSync72, readFileSync as readFileSync57, writeFileSync as writeFileSync44 } from "fs";
38298
38333
  import path87 from "path";
38299
38334
  import chalk242 from "chalk";
38300
38335
 
@@ -38319,7 +38354,7 @@ function insertRuleBullet(content, rule) {
38319
38354
  }
38320
38355
 
38321
38356
  // src/commands/rules/nextRuleCode.ts
38322
- import { readFileSync as readFileSync53 } from "fs";
38357
+ import { readFileSync as readFileSync54 } from "fs";
38323
38358
 
38324
38359
  // src/commands/rules/findClaudeFiles.ts
38325
38360
  import { readdirSync as readdirSync13 } from "fs";
@@ -38343,7 +38378,7 @@ function findClaudeFiles(dir) {
38343
38378
  var CODE_PREFIX = "R";
38344
38379
  function nextRuleCode(root2) {
38345
38380
  const numbers = findClaudeFiles(root2).flatMap(
38346
- (file) => parseRulesSection(readFileSync53(file, "utf8")).map(
38381
+ (file) => parseRulesSection(readFileSync54(file, "utf8")).map(
38347
38382
  (rule) => Number(/(\d+)\s*$/.exec(rule.code)?.[1] ?? 0)
38348
38383
  )
38349
38384
  );
@@ -38369,15 +38404,15 @@ function resolveRuleScope(target) {
38369
38404
  }
38370
38405
 
38371
38406
  // src/commands/rules/updateScopedRulesIndex.ts
38372
- import { existsSync as existsSync71, readFileSync as readFileSync55, writeFileSync as writeFileSync43 } from "fs";
38407
+ import { existsSync as existsSync71, readFileSync as readFileSync56, writeFileSync as writeFileSync43 } from "fs";
38373
38408
  import path86 from "path";
38374
38409
 
38375
38410
  // src/commands/rules/scopedRuleDirectories.ts
38376
- import { readFileSync as readFileSync54 } from "fs";
38411
+ import { readFileSync as readFileSync55 } from "fs";
38377
38412
  import path85 from "path";
38378
38413
  function scopedRuleDirectories(root2) {
38379
38414
  return findClaudeFiles(root2).filter(
38380
- (file) => path85.dirname(file) !== root2 && parseRulesSection(readFileSync54(file, "utf8")).length > 0
38415
+ (file) => path85.dirname(file) !== root2 && parseRulesSection(readFileSync55(file, "utf8")).length > 0
38381
38416
  ).map(
38382
38417
  (file) => `${path85.relative(root2, path85.dirname(file)).split(path85.sep).join("/")}/`
38383
38418
  ).sort();
@@ -38419,7 +38454,7 @@ function upsertScopedRulesPointer(content, directories) {
38419
38454
  function updateScopedRulesIndex(root2) {
38420
38455
  const directories = scopedRuleDirectories(root2);
38421
38456
  const rootFile = path86.join(root2, "CLAUDE.md");
38422
- const before = existsSync71(rootFile) ? readFileSync55(rootFile, "utf8") : "";
38457
+ const before = existsSync71(rootFile) ? readFileSync56(rootFile, "utf8") : "";
38423
38458
  const after = upsertScopedRulesPointer(before, directories);
38424
38459
  if (after !== before) writeFileSync43(rootFile, after);
38425
38460
  return directories;
@@ -38427,7 +38462,7 @@ function updateScopedRulesIndex(root2) {
38427
38462
 
38428
38463
  // src/commands/rules/addRule.ts
38429
38464
  function read2(file) {
38430
- return existsSync72(file) ? readFileSync56(file, "utf8") : "";
38465
+ return existsSync72(file) ? readFileSync57(file, "utf8") : "";
38431
38466
  }
38432
38467
  function addRule(text18, options2) {
38433
38468
  const rule = text18.trim();
@@ -38962,12 +38997,12 @@ import { mkdirSync as mkdirSync27, writeFileSync as writeFileSync46 } from "fs";
38962
38997
  import { mkdirSync as mkdirSync26, writeFileSync as writeFileSync45 } from "fs";
38963
38998
 
38964
38999
  // src/commands/slack/readSlackParts.ts
38965
- import { readFileSync as readFileSync57 } from "fs";
39000
+ import { readFileSync as readFileSync58 } from "fs";
38966
39001
  function readSlackParts(files) {
38967
39002
  return files.map((file) => {
38968
39003
  let contents;
38969
39004
  try {
38970
- contents = readFileSync57(file, "utf8");
39005
+ contents = readFileSync58(file, "utf8");
38971
39006
  } catch {
38972
39007
  console.error(`Error: Part file not found: ${file}`);
38973
39008
  process.exit(1);
@@ -40078,9 +40113,9 @@ function formatVttPassages(passages, notes = [], { sourceMarks = true } = {}) {
40078
40113
  }
40079
40114
 
40080
40115
  // src/commands/transcript/convert/readCleanedCues.ts
40081
- import { readFileSync as readFileSync62 } from "fs";
40116
+ import { readFileSync as readFileSync63 } from "fs";
40082
40117
  function readCleanedCues(inputPath) {
40083
- return deduplicateCues(parseVtt(readFileSync62(inputPath, "utf8")));
40118
+ return deduplicateCues(parseVtt(readFileSync63(inputPath, "utf8")));
40084
40119
  }
40085
40120
 
40086
40121
  // src/commands/transcript/clean.ts
@@ -40854,7 +40889,7 @@ function configKeys2() {
40854
40889
  }
40855
40890
 
40856
40891
  // src/commands/verify/forbiddenStrings.ts
40857
- import { existsSync as existsSync81, readFileSync as readFileSync63 } from "fs";
40892
+ import { existsSync as existsSync81, readFileSync as readFileSync64 } from "fs";
40858
40893
 
40859
40894
  // src/commands/verify/forbiddenStrings/findForbiddenStrings.ts
40860
40895
  import { minimatch as minimatch10 } from "minimatch";
@@ -40901,7 +40936,7 @@ function forbiddenStrings() {
40901
40936
  }
40902
40937
  let parsed;
40903
40938
  try {
40904
- parsed = JSON.parse(readFileSync63(file, "utf8"));
40939
+ parsed = JSON.parse(readFileSync64(file, "utf8"));
40905
40940
  } catch (error) {
40906
40941
  console.log(`Could not parse ${file}: ${error.message}`);
40907
40942
  process.exit(1);
@@ -40971,7 +41006,7 @@ Total: ${lines2.length} hardcoded color(s)`);
40971
41006
  }
40972
41007
 
40973
41008
  // src/commands/verify/migrations.ts
40974
- import { readFileSync as readFileSync64 } from "fs";
41009
+ import { readFileSync as readFileSync65 } from "fs";
40975
41010
  import path103 from "path";
40976
41011
 
40977
41012
  // src/commands/verify/migrations/checkAppendOnly.ts
@@ -41136,7 +41171,7 @@ function migrations2() {
41136
41171
  if (ref) {
41137
41172
  const baseline = readBaselineMigrations(REPO_RELATIVE_DIR, ref);
41138
41173
  const current = new Map(
41139
- files.map((file) => [file, readFileSync64(path103.join(dir, file), "utf8")])
41174
+ files.map((file) => [file, readFileSync65(path103.join(dir, file), "utf8")])
41140
41175
  );
41141
41176
  for (const finding of checkAppendOnly(baseline, current)) {
41142
41177
  problems.push(
@@ -42148,7 +42183,7 @@ async function auth() {
42148
42183
 
42149
42184
  // src/commands/roam/postRoamActivity.ts
42150
42185
  import { execFileSync as execFileSync22 } from "child_process";
42151
- import { readdirSync as readdirSync22, readFileSync as readFileSync65, statSync as statSync14 } from "fs";
42186
+ import { readdirSync as readdirSync22, readFileSync as readFileSync66, statSync as statSync14 } from "fs";
42152
42187
  import { join as join102 } from "path";
42153
42188
  function findPortFile(roamDir) {
42154
42189
  let entries;
@@ -42179,7 +42214,7 @@ function postRoamActivity(app, event) {
42179
42214
  if (!portFile) return;
42180
42215
  let port;
42181
42216
  try {
42182
- port = readFileSync65(portFile, "utf8").trim();
42217
+ port = readFileSync66(portFile, "utf8").trim();
42183
42218
  } catch {
42184
42219
  return;
42185
42220
  }
@@ -42648,11 +42683,11 @@ function applyLine(result, pending, line) {
42648
42683
  }
42649
42684
 
42650
42685
  // src/commands/sessions/daemon/readDaemonPidFile.ts
42651
- import { readFileSync as readFileSync66 } from "fs";
42686
+ import { readFileSync as readFileSync67 } from "fs";
42652
42687
  function readDaemonPidFile() {
42653
42688
  try {
42654
42689
  const pid = Number.parseInt(
42655
- readFileSync66(daemonPaths.pid, "utf8").trim(),
42690
+ readFileSync67(daemonPaths.pid, "utf8").trim(),
42656
42691
  10
42657
42692
  );
42658
42693
  return Number.isInteger(pid) ? pid : void 0;
@@ -43739,14 +43774,14 @@ async function runAutoUpdateLoop(deps2, maxLaps = Number.POSITIVE_INFINITY) {
43739
43774
  }
43740
43775
 
43741
43776
  // src/commands/sessions/daemon/autoUpdate/trimWatcherLog.ts
43742
- import { readFileSync as readFileSync68, writeFileSync as writeFileSync56 } from "fs";
43777
+ import { readFileSync as readFileSync69, writeFileSync as writeFileSync56 } from "fs";
43743
43778
  var KEEP_TAIL = 256 * 1024;
43744
43779
  var MAX_LOG_SIZE = 4 * 1024 * 1024;
43745
43780
  function trimWatcherLog(cwd) {
43746
43781
  const path108 = watcherLogPath(cwd);
43747
43782
  let log2;
43748
43783
  try {
43749
- log2 = readFileSync68(path108, "utf8");
43784
+ log2 = readFileSync69(path108, "utf8");
43750
43785
  } catch {
43751
43786
  return;
43752
43787
  }
@@ -49329,7 +49364,7 @@ function handleConnection(socket, manager) {
49329
49364
  import { unlinkSync as unlinkSync22, writeFileSync as writeFileSync58 } from "fs";
49330
49365
 
49331
49366
  // src/commands/sessions/daemon/startPidFileWatchdog.ts
49332
- import { readFileSync as readFileSync69 } from "fs";
49367
+ import { readFileSync as readFileSync70 } from "fs";
49333
49368
  var WATCHDOG_INTERVAL_MS = 5e3;
49334
49369
  function startPidFileWatchdog(onLost, intervalMs = WATCHDOG_INTERVAL_MS) {
49335
49370
  const timer = setInterval(() => {
@@ -49340,7 +49375,7 @@ function startPidFileWatchdog(onLost, intervalMs = WATCHDOG_INTERVAL_MS) {
49340
49375
  }
49341
49376
  function ownsPidFile() {
49342
49377
  try {
49343
- return readFileSync69(daemonPaths.pid, "utf8").trim() === String(process.pid);
49378
+ return readFileSync70(daemonPaths.pid, "utf8").trim() === String(process.pid);
49344
49379
  } catch {
49345
49380
  return false;
49346
49381
  }