@proxysoul/soulforge 1.5.3 → 1.6.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
@@ -57814,7 +57814,7 @@ var package_default;
57814
57814
  var init_package = __esm(() => {
57815
57815
  package_default = {
57816
57816
  name: "@proxysoul/soulforge",
57817
- version: "1.5.3",
57817
+ version: "1.6.1",
57818
57818
  description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
57819
57819
  repository: {
57820
57820
  type: "git",
@@ -312016,7 +312016,8 @@ var init_forbidden = __esm(() => {
312016
312016
 
312017
312017
  // src/core/intelligence/repo-map-utils.ts
312018
312018
  import { readdir as readdir2, stat as stat2 } from "fs/promises";
312019
- import { extname as extname2, join as join15 } from "path";
312019
+ import { homedir as homedir12 } from "os";
312020
+ import { extname as extname2, join as join15, resolve as resolve9 } from "path";
312020
312021
  function barrelToDir(barrelPath) {
312021
312022
  return barrelPath.replace(BARREL_RE, "");
312022
312023
  }
@@ -312180,14 +312181,33 @@ function getDirGroup(filePath) {
312180
312181
  return null;
312181
312182
  return parts2.length >= 3 ? `${parts2[0]}/${parts2[1]}` : parts2[0] ?? null;
312182
312183
  }
312184
+ function isDangerousRoot(dir) {
312185
+ return DANGEROUS_ROOTS.has(resolve9(dir));
312186
+ }
312183
312187
  async function collectFiles(dir, depth = 0) {
312184
312188
  if (depth === 0) {
312185
312189
  const gitFiles = await collectFilesViaGit(dir);
312186
312190
  if (gitFiles)
312187
- return gitFiles;
312191
+ return {
312192
+ files: gitFiles
312193
+ };
312194
+ if (isDangerousRoot(dir))
312195
+ return {
312196
+ files: [],
312197
+ warning: "Opened in home directory or system root \u2014 no files indexed. Open a project directory instead."
312198
+ };
312188
312199
  }
312189
- const result = await Promise.race([collectFilesWalk(dir, depth), new Promise((r) => setTimeout(() => r([]), 60000))]);
312190
- return result;
312200
+ const collected = [];
312201
+ let hitCap = false;
312202
+ const walkDone = collectFilesWalk(dir, depth, undefined, collected).then(() => {
312203
+ hitCap = collected.length >= WALK_FILE_CAP;
312204
+ });
312205
+ const timedOut = await Promise.race([walkDone.then(() => false), new Promise((r) => setTimeout(() => r(true), 60000))]);
312206
+ const warning = timedOut ? `Walk timeout \u2014 indexed ${String(collected.length)} of possibly more files (60s limit)` : hitCap ? `Large directory \u2014 capped file walk at ${String(WALK_FILE_CAP)} files` : undefined;
312207
+ return {
312208
+ files: collected,
312209
+ warning
312210
+ };
312191
312211
  }
312192
312212
  async function collectFilesViaGit(dir) {
312193
312213
  try {
@@ -312231,20 +312251,25 @@ async function collectFilesViaGit(dir) {
312231
312251
  return null;
312232
312252
  }
312233
312253
  }
312234
- async function collectFilesWalk(dir, depth) {
312254
+ async function collectFilesWalk(dir, depth, counter, out2) {
312235
312255
  if (depth > MAX_DEPTH)
312236
312256
  return [];
312237
- const files = [];
312257
+ const ctx = counter ?? {
312258
+ n: 0
312259
+ };
312260
+ const files = out2 ?? [];
312238
312261
  try {
312239
312262
  for (const entry of await readdir2(dir, {
312240
312263
  withFileTypes: true
312241
312264
  })) {
312265
+ if (ctx.n >= WALK_FILE_CAP)
312266
+ break;
312242
312267
  if (entry.name.startsWith(".") && entry.name !== ".")
312243
312268
  continue;
312244
312269
  const fullPath = join15(dir, entry.name);
312245
312270
  if (entry.isDirectory()) {
312246
312271
  if (!IGNORED_DIRS.has(entry.name)) {
312247
- files.push(...await collectFilesWalk(fullPath, depth + 1));
312272
+ await collectFilesWalk(fullPath, depth + 1, ctx, files);
312248
312273
  }
312249
312274
  } else if (entry.isFile()) {
312250
312275
  if (isForbidden(fullPath))
@@ -312253,21 +312278,23 @@ async function collectFilesWalk(dir, depth) {
312253
312278
  if (ext in INDEXABLE_EXTENSIONS) {
312254
312279
  try {
312255
312280
  const s = await stat2(fullPath);
312256
- if (s.size < MAX_FILE_SIZE)
312281
+ if (s.size < MAX_FILE_SIZE) {
312257
312282
  files.push({
312258
312283
  path: fullPath,
312259
312284
  mtimeMs: s.mtimeMs
312260
312285
  });
312286
+ ctx.n++;
312287
+ }
312261
312288
  } catch {}
312262
312289
  }
312263
312290
  }
312264
- if (files.length % 50 === 0)
312291
+ if (ctx.n % 50 === 0)
312265
312292
  await new Promise((r) => setTimeout(r, 0));
312266
312293
  }
312267
312294
  } catch {}
312268
312295
  return files;
312269
312296
  }
312270
- var INDEXABLE_EXTENSIONS, NON_CODE_LANGUAGES, IMPORT_TRACKABLE_LANGUAGES, BARREL_RE, MAX_FILE_SIZE = 500000, MAX_DEPTH = 10, MAX_REFS_PER_FILE = 5000, PAGERANK_ITERATIONS = 20, PAGERANK_DAMPING = 0.85, DEFAULT_TOKEN_BUDGET = 2500, MIN_TOKEN_BUDGET = 1500, MAX_TOKEN_BUDGET = 4000, DIRTY_DEBOUNCE_MS = 500, GIT_LOG_COMMITS = 300, MAX_COCHANGE_FILES_PER_COMMIT = 20, MAX_INDEXED_FILES = 1e4;
312297
+ var INDEXABLE_EXTENSIONS, NON_CODE_LANGUAGES, IMPORT_TRACKABLE_LANGUAGES, BARREL_RE, DANGEROUS_ROOTS, WALK_FILE_CAP = 50000, MAX_FILE_SIZE = 500000, MAX_DEPTH = 10, MAX_REFS_PER_FILE = 5000, PAGERANK_ITERATIONS = 20, PAGERANK_DAMPING = 0.85, DEFAULT_TOKEN_BUDGET = 2500, MIN_TOKEN_BUDGET = 1500, MAX_TOKEN_BUDGET = 4000, DIRTY_DEBOUNCE_MS = 500, GIT_LOG_COMMITS = 300, MAX_COCHANGE_FILES_PER_COMMIT = 20, MAX_INDEXED_FILES = 1e4;
312271
312298
  var init_repo_map_utils = __esm(() => {
312272
312299
  init_file_tree();
312273
312300
  init_forbidden();
@@ -312344,6 +312371,7 @@ var init_repo_map_utils = __esm(() => {
312344
312371
  NON_CODE_LANGUAGES = new Set(["unknown", "css", "html", "json", "toml", "yaml", "dockerfile"]);
312345
312372
  IMPORT_TRACKABLE_LANGUAGES = new Set(["typescript", "javascript", "python", "go", "rust", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "ocaml", "objc", "solidity"]);
312346
312373
  BARREL_RE = /\/(index\.(ts|js|tsx|mts|mjs)|__init__\.py|mod\.rs)$/;
312374
+ DANGEROUS_ROOTS = new Set([resolve9(homedir12()), "/", "/tmp", "/var", "/usr", "/opt", "/home", "/Users"]);
312347
312375
  });
312348
312376
 
312349
312377
  // src/core/intelligence/repo-map.ts
@@ -312351,7 +312379,7 @@ import { Database as Database2 } from "bun:sqlite";
312351
312379
  import { execSync as execSync4 } from "child_process";
312352
312380
  import { chmodSync as chmodSync3, existsSync as existsSync15, mkdirSync as mkdirSync8, readFileSync as readFileSync9, statSync } from "fs";
312353
312381
  import { stat as statAsync } from "fs/promises";
312354
- import { dirname as dirname5, extname as extname3, join as join16, relative as relative2, resolve as resolve9 } from "path";
312382
+ import { dirname as dirname5, extname as extname3, join as join16, relative as relative2, resolve as resolve10 } from "path";
312355
312383
 
312356
312384
  class RepoMap {
312357
312385
  db;
@@ -312372,6 +312400,8 @@ class RepoMap {
312372
312400
  onProgress = null;
312373
312401
  onScanComplete = null;
312374
312402
  onStaleSymbols = null;
312403
+ onError = null;
312404
+ indexErrors = 0;
312375
312405
  constructor(cwd) {
312376
312406
  this.cwd = cwd;
312377
312407
  const dbDir = join16(cwd, ".soulforge");
@@ -312626,9 +312656,19 @@ class RepoMap {
312626
312656
  }
312627
312657
  async doScan() {
312628
312658
  const tick = () => new Promise((r) => setTimeout(r, 1));
312659
+ this.indexErrors = 0;
312629
312660
  try {
312630
- const allFiles = await collectFiles(this.cwd);
312631
- const files = this.maxFiles > 0 && allFiles.length > this.maxFiles ? await this.applyFileCap(allFiles) : allFiles;
312661
+ const collected = await collectFiles(this.cwd);
312662
+ if (collected.warning)
312663
+ this.onError?.(collected.warning);
312664
+ const allFiles = collected.files;
312665
+ let files;
312666
+ if (this.maxFiles > 0 && allFiles.length > this.maxFiles) {
312667
+ this.onError?.(`Repository has ${String(allFiles.length)} indexable files \u2014 indexing top ${String(this.maxFiles)} by recent activity`);
312668
+ files = await this.applyFileCap(allFiles);
312669
+ } else {
312670
+ files = allFiles;
312671
+ }
312632
312672
  const existingFiles = new Map;
312633
312673
  for (const row of this.db.query("SELECT id, path, mtime_ms FROM files").all()) {
312634
312674
  existingFiles.set(row.path, {
@@ -312670,7 +312710,12 @@ class RepoMap {
312670
312710
  if (file2) {
312671
312711
  try {
312672
312712
  await this.indexFile(file2.absPath, file2.relPath, file2.mtime, file2.language);
312673
- } catch {}
312713
+ } catch (err2) {
312714
+ this.indexErrors++;
312715
+ if (this.indexErrors <= 5) {
312716
+ this.onError?.(`Failed to index ${file2.relPath}: ${err2 instanceof Error ? err2.message : String(err2)}`);
312717
+ }
312718
+ }
312674
312719
  }
312675
312720
  if (i2 % 5 === 0) {
312676
312721
  this.onProgress?.(i2 + 1, toIndex.length);
@@ -312716,12 +312761,12 @@ class RepoMap {
312716
312761
  const {
312717
312762
  execFile
312718
312763
  } = await import("child_process");
312719
- const output = await new Promise((resolve10) => {
312764
+ const output = await new Promise((resolve11) => {
312720
312765
  execFile("git", ["log", "--all", "--name-only", "--format=", "-n", "1000"], {
312721
312766
  cwd: this.cwd,
312722
312767
  timeout: 1e4,
312723
312768
  maxBuffer: 5000000
312724
- }, (err2, stdout) => resolve10(err2 ? "" : stdout));
312769
+ }, (err2, stdout) => resolve11(err2 ? "" : stdout));
312725
312770
  });
312726
312771
  let rank = 0;
312727
312772
  for (const line of output.split(`
@@ -312758,7 +312803,9 @@ class RepoMap {
312758
312803
  const backend = new TreeSitterBackend2;
312759
312804
  await Promise.race([backend.initialize(this.cwd), new Promise((_, reject) => setTimeout(() => reject(new Error("tree-sitter init timeout")), 15000))]);
312760
312805
  this.treeSitter = backend;
312761
- } catch {}
312806
+ } catch (err2) {
312807
+ this.onError?.(`Tree-sitter init failed: ${err2 instanceof Error ? err2.message : String(err2)} \u2014 indexing without AST symbols`);
312808
+ }
312762
312809
  }
312763
312810
  async indexFile(absPath, relPath, mtime, language) {
312764
312811
  const existing = this.db.query("SELECT id FROM files WHERE path = ?").get(relPath);
@@ -312787,8 +312834,15 @@ class RepoMap {
312787
312834
  let outline = null;
312788
312835
  if (this.treeSitter) {
312789
312836
  try {
312790
- outline = await Promise.race([this.treeSitter.getFileOutline(absPath), new Promise((r) => setTimeout(r, 5000, null))]) ?? null;
312791
- } catch {}
312837
+ const parsed = await Promise.race([this.treeSitter.getFileOutline(absPath), new Promise((r) => setTimeout(() => r("timeout"), 5000))]);
312838
+ if (parsed === "timeout") {
312839
+ this.onError?.(`Tree-sitter parse timeout (5s): ${relPath}`);
312840
+ } else {
312841
+ outline = parsed ?? null;
312842
+ }
312843
+ } catch (err2) {
312844
+ this.onError?.(`Tree-sitter parse error on ${relPath}: ${err2 instanceof Error ? err2.message : String(err2)}`);
312845
+ }
312792
312846
  }
312793
312847
  const symbolCount = outline?.symbols.length ?? 0;
312794
312848
  if (existing) {
@@ -312803,8 +312857,12 @@ class RepoMap {
312803
312857
  const seen = new Set;
312804
312858
  const lines = content.split(`
312805
312859
  `);
312860
+ const MAX_SYMBOLS_PER_FILE = 1e4;
312806
312861
  const tx = this.db.transaction(() => {
312862
+ let symbolCount2 = 0;
312807
312863
  for (const sym of outline.symbols) {
312864
+ if (symbolCount2 >= MAX_SYMBOLS_PER_FILE)
312865
+ break;
312808
312866
  const key = `${sym.name}:${String(sym.location.line)}`;
312809
312867
  if (seen.has(key))
312810
312868
  continue;
@@ -312819,6 +312877,7 @@ class RepoMap {
312819
312877
  }
312820
312878
  const sig = extractSignature(lines, sym.location.line - 1, sym.kind);
312821
312879
  insertSym.run(fileId, sym.name, sym.kind, sym.location.line, sym.location.endLine ?? sym.location.line, exportedNames.has(sym.name) ? 1 : 0, sig);
312880
+ symbolCount2++;
312822
312881
  }
312823
312882
  });
312824
312883
  tx();
@@ -312827,25 +312886,18 @@ class RepoMap {
312827
312886
  const fileSyms = this.db.query("SELECT id, name, kind, line, end_line FROM symbols WHERE file_id = ? ORDER BY line ASC").all(fileId);
312828
312887
  const containers = fileSyms.filter((s) => CONTAINER_KINDS.has(s.kind) && s.end_line > s.line);
312829
312888
  if (containers.length > 0) {
312889
+ const sorted = [...containers].sort((a, b) => a.end_line - a.line - (b.end_line - b.line));
312830
312890
  const updateQname = this.db.prepare("UPDATE symbols SET qualified_name = ? WHERE id = ?");
312831
312891
  const qTx = this.db.transaction(() => {
312832
312892
  for (const sym of fileSyms) {
312833
- let enclosing;
312834
- let bestSpan = Infinity;
312835
- for (const c of containers) {
312893
+ for (const c of sorted) {
312836
312894
  if (c.id === sym.id)
312837
312895
  continue;
312838
312896
  if (c.line <= sym.line && c.end_line >= sym.end_line) {
312839
- const span = c.end_line - c.line;
312840
- if (span < bestSpan) {
312841
- bestSpan = span;
312842
- enclosing = c;
312843
- }
312897
+ updateQname.run(`${c.name}.${sym.name}`, sym.id);
312898
+ break;
312844
312899
  }
312845
312900
  }
312846
- if (enclosing) {
312847
- updateQname.run(`${enclosing.name}.${sym.name}`, sym.id);
312848
- }
312849
312901
  }
312850
312902
  });
312851
312903
  qTx();
@@ -313106,7 +313158,7 @@ class RepoMap {
313106
313158
  }
313107
313159
  }
313108
313160
  if (normalized) {
313109
- const base = resolve9(importerDir, normalized);
313161
+ const base = resolve10(importerDir, normalized);
313110
313162
  const relBase = relative2(this.cwd, base);
313111
313163
  if (relBase.startsWith(".."))
313112
313164
  return null;
@@ -313234,7 +313286,10 @@ class RepoMap {
313234
313286
  const insertRef = this.db.prepare("INSERT INTO refs (file_id, name, source_file_id, import_source) VALUES (?, ?, ?, ?)");
313235
313287
  const insertSymbol = this.db.prepare("INSERT INTO symbols (file_id, name, kind, line, end_line, is_exported, signature) VALUES (?, ?, ?, 1, 1, 1, NULL)");
313236
313288
  const expanded = new Set;
313289
+ const starStart = Date.now();
313237
313290
  for (let pass = 0;pass < 10; pass++) {
313291
+ if (Date.now() - starStart > 1e4)
313292
+ break;
313238
313293
  const starRefs = this.db.query("SELECT file_id, source_file_id FROM refs WHERE name = '*' AND source_file_id IS NOT NULL").all();
313239
313294
  let changed = false;
313240
313295
  const tx = this.db.transaction(() => {
@@ -313736,12 +313791,12 @@ class RepoMap {
313736
313791
  const {
313737
313792
  execFile
313738
313793
  } = await import("child_process");
313739
- logOutput = await new Promise((resolve10, reject) => {
313794
+ logOutput = await new Promise((resolve11, reject) => {
313740
313795
  execFile("git", ["log", "--pretty=format:---COMMIT---", "--name-only", "-n", String(GIT_LOG_COMMITS)], {
313741
313796
  cwd: this.cwd,
313742
313797
  timeout: 1e4,
313743
313798
  maxBuffer: 5000000
313744
- }, (err2, stdout) => err2 ? reject(err2) : resolve10(stdout));
313799
+ }, (err2, stdout) => err2 ? reject(err2) : resolve11(stdout));
313745
313800
  });
313746
313801
  } catch {
313747
313802
  return;
@@ -314209,6 +314264,7 @@ class RepoMap {
314209
314264
  }
314210
314265
  async buildCallGraph() {
314211
314266
  const tick = () => new Promise((r) => setTimeout(r, 1));
314267
+ const regexCache2 = new Map;
314212
314268
  this.db.run("DELETE FROM calls");
314213
314269
  const filesWithImports = this.db.query(`SELECT DISTINCT f.id, f.path FROM files f
314214
314270
  WHERE EXISTS (SELECT 1 FROM symbols s WHERE s.file_id = f.id AND s.kind IN ('function', 'method'))
@@ -314248,11 +314304,19 @@ class RepoMap {
314248
314304
  const functions = getFunctions.all(file2.id);
314249
314305
  if (functions.length === 0)
314250
314306
  continue;
314251
- const importPatterns = imports.map((imp) => ({
314252
- name: imp.name,
314253
- sourceFileId: imp.source_file_id,
314254
- re: new RegExp(`\\b${imp.name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`)
314255
- }));
314307
+ const importPatterns = imports.map((imp) => {
314308
+ const escaped = imp.name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
314309
+ let re = regexCache2.get(imp.name);
314310
+ if (!re) {
314311
+ re = new RegExp(`\\b${escaped}\\b`);
314312
+ regexCache2.set(imp.name, re);
314313
+ }
314314
+ return {
314315
+ name: imp.name,
314316
+ sourceFileId: imp.source_file_id,
314317
+ re
314318
+ };
314319
+ });
314256
314320
  for (const func2 of functions) {
314257
314321
  const bodyStart = func2.line;
314258
314322
  const bodyEnd = Math.min(func2.end_line, lines.length);
@@ -315419,13 +315483,9 @@ class RepoMap {
315419
315483
  this.db.run("INSERT INTO symbols_fts(rowid, name, kind) SELECT id, name, kind FROM symbols");
315420
315484
  }
315421
315485
  compactIfNeeded() {
315422
- const bytes = this.dbSizeBytes();
315423
- if (bytes > 52428800) {
315424
- try {
315425
- this.db.run("PRAGMA wal_checkpoint(TRUNCATE)");
315426
- this.db.run("VACUUM");
315427
- } catch {}
315428
- }
315486
+ try {
315487
+ this.db.run("PRAGMA wal_checkpoint(TRUNCATE)");
315488
+ } catch {}
315429
315489
  }
315430
315490
  dbSizeBytes() {
315431
315491
  try {
@@ -315491,7 +315551,7 @@ var init_intelligence = __esm(() => {
315491
315551
  // src/core/tools/analyze.ts
315492
315552
  import { spawn as spawn3 } from "child_process";
315493
315553
  import { readFile as readFile7 } from "fs/promises";
315494
- import { resolve as resolve10 } from "path";
315554
+ import { resolve as resolve11 } from "path";
315495
315555
  async function fallbackTracked(file2, operation, fn) {
315496
315556
  const router2 = getIntelligenceRouter(process.cwd());
315497
315557
  const language = router2.detectLanguage(file2);
@@ -315518,7 +315578,7 @@ var init_analyze = __esm(() => {
315518
315578
  execute: async (args2) => {
315519
315579
  try {
315520
315580
  const client = getIntelligenceClient();
315521
- const file2 = args2.file ? resolve10(args2.file) : undefined;
315581
+ const file2 = args2.file ? resolve11(args2.file) : undefined;
315522
315582
  if (file2) {
315523
315583
  const blocked = isForbidden(file2);
315524
315584
  if (blocked) {
@@ -315749,7 +315809,7 @@ ${unusedLines.join(`
315749
315809
  }
315750
315810
  let newContent;
315751
315811
  try {
315752
- newContent = await readFile7(resolve10(file2), "utf-8");
315812
+ newContent = await readFile7(resolve11(file2), "utf-8");
315753
315813
  } catch {
315754
315814
  return {
315755
315815
  success: false,
@@ -315883,10 +315943,10 @@ var init_constants2 = __esm(() => {
315883
315943
 
315884
315944
  // src/core/tools/discover-pattern.ts
315885
315945
  import { readFile as readFile8 } from "fs/promises";
315886
- import { resolve as resolve11 } from "path";
315946
+ import { resolve as resolve12 } from "path";
315887
315947
  async function lineCount(file2) {
315888
315948
  try {
315889
- return (await readFile8(resolve11(file2), "utf-8")).split(`
315949
+ return (await readFile8(resolve12(file2), "utf-8")).split(`
315890
315950
  `).length;
315891
315951
  } catch {
315892
315952
  return null;
@@ -315903,7 +315963,7 @@ var init_discover_pattern = __esm(() => {
315903
315963
  try {
315904
315964
  const client = getIntelligenceClient();
315905
315965
  const router2 = getIntelligenceRouter(process.cwd());
315906
- const file2 = args2.file ? resolve11(args2.file) : undefined;
315966
+ const file2 = args2.file ? resolve12(args2.file) : undefined;
315907
315967
  const language = router2.detectLanguage(file2);
315908
315968
  let symbols;
315909
315969
  if (client) {
@@ -316181,7 +316241,7 @@ __export(exports_tee, {
316181
316241
  saveTee: () => saveTee
316182
316242
  });
316183
316243
  import { mkdir, readdir as readdir3, unlink, writeFile } from "fs/promises";
316184
- import { homedir as homedir12 } from "os";
316244
+ import { homedir as homedir13 } from "os";
316185
316245
  import { join as join17 } from "path";
316186
316246
  async function ensureDir() {
316187
316247
  if (dirReady)
@@ -316244,7 +316304,7 @@ async function truncateWithTee(output, limit, headSize, tailSize, label) {
316244
316304
  }
316245
316305
  var TEE_DIR, MAX_TEE_FILES = 20, MAX_TEE_BYTES = 512000, dirReady = false;
316246
316306
  var init_tee = __esm(() => {
316247
- TEE_DIR = join17(homedir12(), ".local", "share", "soulforge", "tee");
316307
+ TEE_DIR = join17(homedir13(), ".local", "share", "soulforge", "tee");
316248
316308
  });
316249
316309
 
316250
316310
  // src/core/tools/project.ts
@@ -317240,7 +317300,7 @@ var init_file_events = __esm(() => {
317240
317300
 
317241
317301
  // src/core/tools/edit-stack.ts
317242
317302
  import { stat as statAsync2, writeFile as writeFile2 } from "fs/promises";
317243
- import { resolve as resolve12 } from "path";
317303
+ import { resolve as resolve13 } from "path";
317244
317304
  function contentHash(s) {
317245
317305
  return Number(Bun.hash(s));
317246
317306
  }
@@ -317354,7 +317414,7 @@ var init_edit_stack = __esm(() => {
317354
317414
  description: "Undo the last edit_file change to a file. Refuses if the file was modified since the edit \u2014 read the file and use edit_file to surgically revert instead.",
317355
317415
  execute: async (args2) => {
317356
317416
  try {
317357
- const filePath = resolve12(args2.path);
317417
+ const filePath = resolve13(args2.path);
317358
317418
  const blocked = isForbidden(filePath);
317359
317419
  if (blocked) {
317360
317420
  const msg = `Access denied: "${args2.path}" matches forbidden pattern "${blocked}".`;
@@ -317537,7 +317597,7 @@ var init_post_edit = __esm(() => {
317537
317597
 
317538
317598
  // src/core/tools/edit-file.ts
317539
317599
  import { mkdir as mkdir2, readFile as readFile10, stat as statAsync3, writeFile as writeFile3 } from "fs/promises";
317540
- import { dirname as dirname6, resolve as resolve13 } from "path";
317600
+ import { dirname as dirname6, resolve as resolve14 } from "path";
317541
317601
  function formatMetricDelta(label, before, after) {
317542
317602
  const delta = after - before;
317543
317603
  if (delta === 0)
@@ -317720,7 +317780,7 @@ var init_edit_file = __esm(() => {
317720
317780
  description: "[TIER-1] Edit a file by replacing content. Read first, then provide path, oldString, newString. " + "Provide lineStart (1-indexed from read_file output) for reliable line-anchored matching \u2014 " + "the range is derived from oldString line count. Without lineStart, falls back to string matching (fails if ambiguous). Empty oldString creates a new file. Use multi_edit for multiple changes to the same file. Edits are applied immediately.",
317721
317781
  execute: async (args2) => {
317722
317782
  try {
317723
- const filePath = resolve13(args2.path);
317783
+ const filePath = resolve14(args2.path);
317724
317784
  const blocked = isForbidden(filePath);
317725
317785
  if (blocked) {
317726
317786
  const msg = `Access denied: "${args2.path}" matches forbidden pattern "${blocked}". This file is blocked for security.`;
@@ -317894,7 +317954,7 @@ function toolDenied(msg) {
317894
317954
  }
317895
317955
 
317896
317956
  // src/core/tools/editor.ts
317897
- import { resolve as resolve14 } from "path";
317957
+ import { resolve as resolve15 } from "path";
317898
317958
  async function checkCurrentBufferForbidden(nvim) {
317899
317959
  if (!nvim)
317900
317960
  return null;
@@ -317981,9 +318041,9 @@ async function withNvimRaw(fn, file2) {
317981
318041
  async function switchToFile(nvim, file2) {
317982
318042
  if (!file2)
317983
318043
  return;
317984
- const targetPath = resolve14(file2);
318044
+ const targetPath = resolve15(file2);
317985
318045
  const currentBuf = await nvim.api.request("nvim_buf_get_name", [0]);
317986
- if (typeof currentBuf === "string" && resolve14(currentBuf) !== targetPath) {
318046
+ if (typeof currentBuf === "string" && resolve15(currentBuf) !== targetPath) {
317987
318047
  await nvim.api.executeLua("vim.cmd.edit(vim.fn.fnameescape(...))", [targetPath]);
317988
318048
  }
317989
318049
  }
@@ -318129,7 +318189,7 @@ var init_editor = __esm(() => {
318129
318189
  strictIndexing: false
318130
318190
  }), nvim.api.request("nvim_buf_get_name", [0])]);
318131
318191
  if (typeof bufName === "string" && bufName) {
318132
- emitFileRead(resolve14(bufName));
318192
+ emitFileRead(resolve15(bufName));
318133
318193
  }
318134
318194
  const lineOffset = args2.startLine ?? 1;
318135
318195
  const numbered = lines.map((l, i2) => `${String(i2 + lineOffset).padStart(4)} ${l}`);
@@ -318163,7 +318223,7 @@ var init_editor = __esm(() => {
318163
318223
  strictIndexing: false
318164
318224
  })]);
318165
318225
  if (typeof bufName === "string" && bufName) {
318166
- emitFileEdited(resolve14(bufName), allLines.join(`
318226
+ emitFileEdited(resolve15(bufName), allLines.join(`
318167
318227
  `));
318168
318228
  }
318169
318229
  const count = replacementLines.length;
@@ -323466,8 +323526,8 @@ class CustomElementRegistry {
323466
323526
  } : (element) => element.localName === localName;
323467
323527
  registry2.set(localName, { Class: Class2, check: check2 });
323468
323528
  if (waiting.has(localName)) {
323469
- for (const resolve15 of waiting.get(localName))
323470
- resolve15(Class2);
323529
+ for (const resolve16 of waiting.get(localName))
323530
+ resolve16(Class2);
323471
323531
  waiting.delete(localName);
323472
323532
  }
323473
323533
  ownerDocument.querySelectorAll(extend2 ? `${extend2}[is="${localName}"]` : localName).forEach(this.upgrade, this);
@@ -323499,13 +323559,13 @@ class CustomElementRegistry {
323499
323559
  }
323500
323560
  whenDefined(localName) {
323501
323561
  const { registry: registry2, waiting } = this;
323502
- return new Promise((resolve15) => {
323562
+ return new Promise((resolve16) => {
323503
323563
  if (registry2.has(localName))
323504
- resolve15(registry2.get(localName).Class);
323564
+ resolve16(registry2.get(localName).Class);
323505
323565
  else {
323506
323566
  if (!waiting.has(localName))
323507
323567
  waiting.set(localName, []);
323508
- waiting.get(localName).push(resolve15);
323568
+ waiting.get(localName).push(resolve16);
323509
323569
  }
323510
323570
  });
323511
323571
  }
@@ -331787,7 +331847,7 @@ class WorkerClient {
331787
331847
  args: args2
331788
331848
  });
331789
331849
  this.onRpcStart?.();
331790
- return new Promise((resolve15, reject) => {
331850
+ return new Promise((resolve16, reject) => {
331791
331851
  const timer = setTimeout(() => {
331792
331852
  if (this.pending.delete(id)) {
331793
331853
  this.onRpcEnd?.(true);
@@ -331798,7 +331858,7 @@ class WorkerClient {
331798
331858
  resolve: (v) => {
331799
331859
  clearTimeout(timer);
331800
331860
  this.onRpcEnd?.();
331801
- resolve15(v);
331861
+ resolve16(v);
331802
331862
  },
331803
331863
  reject: (e) => {
331804
331864
  clearTimeout(timer);
@@ -331940,7 +332000,7 @@ __export(exports_io_client, {
331940
332000
  disposeIOClient: () => disposeIOClient,
331941
332001
  IOClient: () => IOClient
331942
332002
  });
331943
- import { homedir as homedir13 } from "os";
332003
+ import { homedir as homedir14 } from "os";
331944
332004
  import { join as join19 } from "path";
331945
332005
  function getIOClient() {
331946
332006
  if (!_instance2)
@@ -331958,7 +332018,7 @@ var init_io_client = __esm(() => {
331958
332018
  IS_DIST = !IS_COMPILED && import.meta.dir.includes("/dist");
331959
332019
  IOClient = class IOClient extends WorkerClient {
331960
332020
  constructor() {
331961
- const workerPath = IS_COMPILED ? join19(homedir13(), ".soulforge", "workers", "io.worker.js") : IS_DIST ? join19(import.meta.dir, "workers", "io.worker.js") : join19(import.meta.dir, "io.worker.ts");
332021
+ const workerPath = IS_COMPILED ? join19(homedir14(), ".soulforge", "workers", "io.worker.js") : IS_DIST ? join19(import.meta.dir, "workers", "io.worker.js") : join19(import.meta.dir, "io.worker.ts");
331962
332022
  super(workerPath, undefined, {
331963
332023
  smol: true
331964
332024
  });
@@ -332022,7 +332082,7 @@ var init_io_client = __esm(() => {
332022
332082
  // src/core/git/status.ts
332023
332083
  import { spawn as spawn4 } from "child_process";
332024
332084
  function run2(args2, cwd, timeout = 5000) {
332025
- return new Promise((resolve15) => {
332085
+ return new Promise((resolve16) => {
332026
332086
  const chunks = [];
332027
332087
  const proc = spawn4("git", args2, {
332028
332088
  cwd,
@@ -332032,11 +332092,11 @@ function run2(args2, cwd, timeout = 5000) {
332032
332092
  }
332033
332093
  });
332034
332094
  proc.stdout.on("data", (d) => chunks.push(d.toString()));
332035
- proc.on("close", (code) => resolve15({
332095
+ proc.on("close", (code) => resolve16({
332036
332096
  ok: code === 0,
332037
332097
  stdout: chunks.join("")
332038
332098
  }));
332039
- proc.on("error", () => resolve15({
332099
+ proc.on("error", () => resolve16({
332040
332100
  ok: false,
332041
332101
  stdout: ""
332042
332102
  }));
@@ -333106,12 +333166,12 @@ function getFdBin() {
333106
333166
  return _fdBinPromise;
333107
333167
  _fdBinPromise = (async () => {
333108
333168
  for (const bin of ["fd", "fdfind"]) {
333109
- const found = await new Promise((resolve15) => {
333169
+ const found = await new Promise((resolve16) => {
333110
333170
  const proc = spawn5("sh", ["-c", `command -v ${bin}`], {
333111
333171
  stdio: "ignore"
333112
333172
  });
333113
- proc.on("error", () => resolve15(false));
333114
- proc.on("close", (code) => resolve15(code === 0));
333173
+ proc.on("error", () => resolve16(false));
333174
+ proc.on("close", (code) => resolve16(code === 0));
333115
333175
  });
333116
333176
  if (found) {
333117
333177
  _fdBin = bin;
@@ -333124,40 +333184,40 @@ function getFdBin() {
333124
333184
  return _fdBinPromise;
333125
333185
  }
333126
333186
  function runFd(bin, pattern, basePath) {
333127
- return new Promise((resolve15) => {
333187
+ return new Promise((resolve16) => {
333128
333188
  const proc = spawn5(bin, ["--glob", pattern, basePath, "--max-results", "50", "--max-depth", "8"], {
333129
333189
  cwd: process.cwd(),
333130
333190
  timeout: 1e4
333131
333191
  });
333132
333192
  const chunks = [];
333133
333193
  proc.stdout.on("data", (data) => chunks.push(data.toString()));
333134
- proc.on("error", () => resolve15(null));
333194
+ proc.on("error", () => resolve16(null));
333135
333195
  proc.on("close", (code) => {
333136
333196
  if (code === 0) {
333137
- resolve15({
333197
+ resolve16({
333138
333198
  success: true,
333139
333199
  output: chunks.join("") || "No files found."
333140
333200
  });
333141
333201
  } else {
333142
- resolve15(null);
333202
+ resolve16(null);
333143
333203
  }
333144
333204
  });
333145
333205
  });
333146
333206
  }
333147
333207
  function runFind(pattern, basePath) {
333148
- return new Promise((resolve15) => {
333208
+ return new Promise((resolve16) => {
333149
333209
  const proc = spawn5("find", [basePath, "-name", pattern, "-maxdepth", "5"], {
333150
333210
  cwd: process.cwd(),
333151
333211
  timeout: 1e4
333152
333212
  });
333153
333213
  const chunks = [];
333154
333214
  proc.stdout.on("data", (data) => chunks.push(data.toString()));
333155
- proc.on("error", () => resolve15({
333215
+ proc.on("error", () => resolve16({
333156
333216
  success: true,
333157
333217
  output: "No files found."
333158
333218
  }));
333159
333219
  proc.on("close", () => {
333160
- resolve15({
333220
+ resolve16({
333161
333221
  success: true,
333162
333222
  output: chunks.join("") || "No files found."
333163
333223
  });
@@ -333197,7 +333257,7 @@ var init_glob = __esm(() => {
333197
333257
 
333198
333258
  // src/core/tools/grep.ts
333199
333259
  import { spawn as spawn6 } from "child_process";
333200
- import { resolve as resolve15 } from "path";
333260
+ import { resolve as resolve16 } from "path";
333201
333261
  async function enrichWithSymbolContext(output) {
333202
333262
  if (output === "No matches found.")
333203
333263
  return output;
@@ -333219,7 +333279,7 @@ async function enrichWithSymbolContext(output) {
333219
333279
  const outlines = new Map;
333220
333280
  await Promise.all([...hitsByFile.keys()].map(async (file2) => {
333221
333281
  try {
333222
- const abs = resolve15(file2);
333282
+ const abs = resolve16(file2);
333223
333283
  let ol = null;
333224
333284
  if (client) {
333225
333285
  const tracked = await client.routerGetFileOutline(abs);
@@ -333381,7 +333441,7 @@ var init_grep = __esm(() => {
333381
333441
 
333382
333442
  // src/core/tools/list-dir.ts
333383
333443
  import { readdir as readdir5, stat as stat3 } from "fs/promises";
333384
- import { join as join20, relative as relative4, resolve as resolve16 } from "path";
333444
+ import { join as join20, relative as relative4, resolve as resolve17 } from "path";
333385
333445
  function formatEntry(name21, isDir, meta3) {
333386
333446
  if (isDir)
333387
333447
  return `\uD83D\uDCC1 ${name21}/`;
@@ -333499,7 +333559,7 @@ var init_list_dir = __esm(() => {
333499
333559
  const seen = new Set;
333500
333560
  const targetPaths = [];
333501
333561
  for (const raw of rawPaths) {
333502
- const abs = resolve16(raw);
333562
+ const abs = resolve17(raw);
333503
333563
  if (seen.has(abs))
333504
333564
  continue;
333505
333565
  seen.add(abs);
@@ -333719,9 +333779,9 @@ __export(exports_post_edit_fix, {
333719
333779
  autoFixFiles: () => autoFixFiles
333720
333780
  });
333721
333781
  import { readFile as readFile11, writeFile as writeFile4 } from "fs/promises";
333722
- import { resolve as resolve17 } from "path";
333782
+ import { resolve as resolve18 } from "path";
333723
333783
  async function autoFixFile(filePath, tabId) {
333724
- const absPath = resolve17(filePath);
333784
+ const absPath = resolve18(filePath);
333725
333785
  const client = getIntelligenceClient();
333726
333786
  const router2 = getIntelligenceRouter(process.cwd());
333727
333787
  const language = client ? await client.routerDetectLanguage(absPath) : router2.detectLanguage(absPath);
@@ -333780,7 +333840,7 @@ async function autoFixFile(filePath, tabId) {
333780
333840
  }
333781
333841
  async function autoFixFiles(filePaths, tabId) {
333782
333842
  const results = new Map;
333783
- const unique = [...new Set(filePaths.map((f) => resolve17(f)))];
333843
+ const unique = [...new Set(filePaths.map((f) => resolve18(f)))];
333784
333844
  await Promise.all(unique.map(async (file2) => {
333785
333845
  try {
333786
333846
  const actions = await autoFixFile(file2, tabId);
@@ -333836,7 +333896,7 @@ var init_post_edit_fix = __esm(() => {
333836
333896
 
333837
333897
  // src/core/tools/move-symbol.ts
333838
333898
  import { access as access2, mkdir as mkdir3, readFile as readFile12, unlink as unlink2, writeFile as writeFile5 } from "fs/promises";
333839
- import { dirname as dirname7, relative as relative5, resolve as resolve18 } from "path";
333899
+ import { dirname as dirname7, relative as relative5, resolve as resolve19 } from "path";
333840
333900
 
333841
333901
  class WriteTransaction {
333842
333902
  writes = [];
@@ -333968,11 +334028,11 @@ function findCommentStart(lines, defStart) {
333968
334028
  return start2;
333969
334029
  }
333970
334030
  async function findProjectRoot(file2) {
333971
- let dir = dirname7(resolve18(file2));
334031
+ let dir = dirname7(resolve19(file2));
333972
334032
  for (let depth = 0;depth < 20; depth++) {
333973
334033
  for (const m of ["tsconfig.json", "package.json", "Cargo.toml", "go.mod", "pyproject.toml", "Makefile"]) {
333974
334034
  try {
333975
- await access2(resolve18(dir, m));
334035
+ await access2(resolve19(dir, m));
333976
334036
  return dir;
333977
334037
  } catch {}
333978
334038
  }
@@ -333992,7 +334052,7 @@ async function grepSymbol(symbol26, root) {
333992
334052
  });
333993
334053
  const text2 = await new Response(proc.stdout).text();
333994
334054
  return text2.trim().split(`
333995
- `).filter(Boolean).map((f) => resolve18(f));
334055
+ `).filter(Boolean).map((f) => resolve19(f));
333996
334056
  } catch {
333997
334057
  return [];
333998
334058
  }
@@ -334125,7 +334185,7 @@ ${lines[j] ?? ""}`;
334125
334185
  const dir = dirname7(contextFile);
334126
334186
  const base = source.replace(/\.(js|ts|jsx|tsx|mjs|cjs)$/, "");
334127
334187
  for (const ext of [".ts", ".tsx", ".js", ".jsx"]) {
334128
- const p = resolve18(dir, base + ext);
334188
+ const p = resolve19(dir, base + ext);
334129
334189
  try {
334130
334190
  await access2(p);
334131
334191
  return p;
@@ -334183,19 +334243,19 @@ ${lines[j] ?? ""}`;
334183
334243
  for (let i2 = 0;i2 < levels; i2++)
334184
334244
  dir = dirname7(dir);
334185
334245
  const parts3 = source.slice(dotStr.length).split(".");
334186
- const modPath2 = resolve18(dir, ...parts3);
334246
+ const modPath2 = resolve19(dir, ...parts3);
334187
334247
  if (await fileExists(`${modPath2}.py`))
334188
334248
  return `${modPath2}.py`;
334189
- if (await fileExists(resolve18(modPath2, "__init__.py")))
334190
- return resolve18(modPath2, "__init__.py");
334249
+ if (await fileExists(resolve19(modPath2, "__init__.py")))
334250
+ return resolve19(modPath2, "__init__.py");
334191
334251
  return null;
334192
334252
  }
334193
334253
  const parts2 = source.split(".");
334194
- const modPath = resolve18(dirname7(contextFile), ...parts2);
334254
+ const modPath = resolve19(dirname7(contextFile), ...parts2);
334195
334255
  if (await fileExists(`${modPath}.py`))
334196
334256
  return `${modPath}.py`;
334197
- if (await fileExists(resolve18(modPath, "__init__.py")))
334198
- return resolve18(modPath, "__init__.py");
334257
+ if (await fileExists(resolve19(modPath, "__init__.py")))
334258
+ return resolve19(modPath, "__init__.py");
334199
334259
  return null;
334200
334260
  },
334201
334261
  computePath(fromFile, toFile) {
@@ -334339,7 +334399,7 @@ ${lines[j] ?? ""}`;
334339
334399
  return result;
334340
334400
  },
334341
334401
  async resolveSource(source, contextFile) {
334342
- const p = resolve18(dirname7(contextFile), source);
334402
+ const p = resolve19(dirname7(contextFile), source);
334343
334403
  try {
334344
334404
  await access2(p);
334345
334405
  return p;
@@ -334359,8 +334419,8 @@ ${lines[j] ?? ""}`;
334359
334419
  description: "[TIER-3] Move a symbol between files with automatic import updates across the codebase.",
334360
334420
  execute: async (args2) => {
334361
334421
  try {
334362
- const from = resolve18(args2.from);
334363
- const to = resolve18(args2.to);
334422
+ const from = resolve19(args2.from);
334423
+ const to = resolve19(args2.to);
334364
334424
  try {
334365
334425
  await access2(from);
334366
334426
  } catch {
@@ -334631,7 +334691,7 @@ ${fixed}`);
334631
334691
 
334632
334692
  // src/core/tools/multi-edit.ts
334633
334693
  import { readFile as readFile13, stat as statAsync4, writeFile as writeFile6 } from "fs/promises";
334634
- import { resolve as resolve19 } from "path";
334694
+ import { resolve as resolve20 } from "path";
334635
334695
  var multiEditTool;
334636
334696
  var init_multi_edit = __esm(() => {
334637
334697
  init_instance();
@@ -334644,7 +334704,7 @@ var init_multi_edit = __esm(() => {
334644
334704
  description: "Apply multiple edits to a single file atomically. All-or-nothing: if any edit fails, ZERO edits are applied. " + "lineStart values reference the ORIGINAL file (pre-edit) \u2014 the tool tracks cumulative line offsets internally. " + "Provide lineStart (1-indexed) for reliable line-anchored matching. Without it, falls back to string matching against evolved content. " + "The range is derived from oldString line count.",
334645
334705
  execute: async (args2) => {
334646
334706
  try {
334647
- const filePath = resolve19(args2.path);
334707
+ const filePath = resolve20(args2.path);
334648
334708
  const blocked = isForbidden(filePath);
334649
334709
  if (blocked) {
334650
334710
  const msg = `Access denied: "${args2.path}" matches forbidden pattern "${blocked}".`;
@@ -334864,7 +334924,7 @@ ${diffOutput}`;
334864
334924
 
334865
334925
  // src/core/tools/navigate.ts
334866
334926
  import { stat as statAsync5 } from "fs/promises";
334867
- import { resolve as resolve20 } from "path";
334927
+ import { resolve as resolve21 } from "path";
334868
334928
  function formatLocation(loc) {
334869
334929
  const end = loc.endLine ? `-${String(loc.endLine)}` : "";
334870
334930
  return `${loc.file}:${String(loc.line)}${end}`;
@@ -334916,7 +334976,7 @@ async function autoResolveFile(client, symbol26, repoMap) {
334916
334976
  const matches2 = exact.length > 0 ? exact : results.slice(0, 1);
334917
334977
  const validFiles = [];
334918
334978
  for (const m of matches2) {
334919
- const f = resolve20(m.location.file);
334979
+ const f = resolve21(m.location.file);
334920
334980
  try {
334921
334981
  const st = await statAsync5(f);
334922
334982
  if (st.isFile())
@@ -334942,7 +335002,7 @@ async function autoResolveFile(client, symbol26, repoMap) {
334942
335002
  });
334943
335003
  const text2 = await new Response(proc.stdout).text();
334944
335004
  const grepMatches = text2.trim().split(`
334945
- `).filter(Boolean).map((p) => resolve20(p));
335005
+ `).filter(Boolean).map((p) => resolve21(p));
334946
335006
  if (grepMatches.length === 1)
334947
335007
  return {
334948
335008
  resolved: grepMatches[0]
@@ -334981,7 +335041,7 @@ var init_navigate = __esm(() => {
334981
335041
  execute: async (args2, repoMap) => {
334982
335042
  try {
334983
335043
  const client = getIntelligenceClient();
334984
- let file2 = args2.file ? resolve20(args2.file) : undefined;
335044
+ let file2 = args2.file ? resolve21(args2.file) : undefined;
334985
335045
  const symbol26 = args2.symbol;
334986
335046
  if (file2) {
334987
335047
  const blocked = isForbidden(file2);
@@ -335613,7 +335673,7 @@ var init_lib2 = () => {};
335613
335673
 
335614
335674
  // src/core/tools/binary-detect.ts
335615
335675
  import { existsSync as existsSync16, statSync as statSync3 } from "fs";
335616
- import { extname as extname4, resolve as resolve21 } from "path";
335676
+ import { extname as extname4, resolve as resolve22 } from "path";
335617
335677
  function binaryHint(ext) {
335618
335678
  if (IMAGE_EXTS.has(ext))
335619
335679
  return " This is an image file. Describe what you need from it or ask the user to describe its contents.";
@@ -335658,7 +335718,7 @@ function checkShellBinaryRead(command, cwd2) {
335658
335718
  const arg = tokens[i2];
335659
335719
  if (!arg || arg.startsWith("-"))
335660
335720
  continue;
335661
- const abs = resolve21(cwd2, arg);
335721
+ const abs = resolve22(cwd2, arg);
335662
335722
  const err2 = checkBinaryFile(abs);
335663
335723
  if (err2)
335664
335724
  return err2;
@@ -335679,7 +335739,7 @@ var init_binary_detect = __esm(() => {
335679
335739
 
335680
335740
  // src/core/tools/read-file.ts
335681
335741
  import { access as access3, stat as statAsync6 } from "fs/promises";
335682
- import { extname as extname5, resolve as resolve22 } from "path";
335742
+ import { extname as extname5, resolve as resolve23 } from "path";
335683
335743
  async function readViaWorker(filePath, args2) {
335684
335744
  let result;
335685
335745
  try {
@@ -335916,7 +335976,7 @@ var init_read_file = __esm(() => {
335916
335976
  description: "[TIER-1] Read file contents with line numbers. Use Soul Map :line numbers to jump directly to symbols. " + "Supports startLine/endLine ranges, or target + name for AST-based symbol extraction. " + "Read ALL needed files in a single parallel call. Use content you already have \u2014 skip re-reads.",
335917
335977
  execute: async (args2) => {
335918
335978
  try {
335919
- const filePath = resolve22(args2.path);
335979
+ const filePath = resolve23(args2.path);
335920
335980
  if (args2.target) {
335921
335981
  return readSymbolFromFile(filePath, args2);
335922
335982
  }
@@ -335944,7 +336004,7 @@ var init_read_file = __esm(() => {
335944
336004
 
335945
336005
  // src/core/tools/refactor.ts
335946
336006
  import { readFile as readFile14, writeFile as writeFile7 } from "fs/promises";
335947
- import { resolve as resolve23 } from "path";
336007
+ import { resolve as resolve24 } from "path";
335948
336008
  async function fallbackTracked3(file2, operation, fn) {
335949
336009
  const router2 = getIntelligenceRouter(process.cwd());
335950
336010
  const language = router2.detectLanguage(file2);
@@ -336060,7 +336120,7 @@ var init_refactor = __esm(() => {
336060
336120
  execute: async (args2) => {
336061
336121
  try {
336062
336122
  const router2 = getIntelligenceRouter(process.cwd());
336063
- const file2 = args2.file ? resolve23(args2.file) : undefined;
336123
+ const file2 = args2.file ? resolve24(args2.file) : undefined;
336064
336124
  if (file2) {
336065
336125
  const blocked = isForbidden(file2);
336066
336126
  if (blocked) {
@@ -336322,7 +336382,7 @@ ${diagOutput}`;
336322
336382
 
336323
336383
  // src/core/tools/rename-file.ts
336324
336384
  import { mkdir as mkdir4, readFile as readFile15, rename as rename2, stat as statAsync7, writeFile as writeFile8 } from "fs/promises";
336325
- import { dirname as dirname8, relative as relative6, resolve as resolve24 } from "path";
336385
+ import { dirname as dirname8, relative as relative6, resolve as resolve25 } from "path";
336326
336386
  var renameFileTool;
336327
336387
  var init_rename_file = __esm(() => {
336328
336388
  init_intelligence();
@@ -336333,8 +336393,8 @@ var init_rename_file = __esm(() => {
336333
336393
  name: "rename_file",
336334
336394
  description: "Rename or move a file. LSP automatically updates all imports/references across the project. Use for refactoring file structure.",
336335
336395
  execute: async (args2) => {
336336
- const from = resolve24(args2.from);
336337
- const to = resolve24(args2.to);
336396
+ const from = resolve25(args2.from);
336397
+ const to = resolve25(args2.to);
336338
336398
  const cwd2 = process.cwd();
336339
336399
  try {
336340
336400
  await statAsync7(from);
@@ -336483,7 +336543,7 @@ ${fixed}`);
336483
336543
 
336484
336544
  // src/core/tools/rename-symbol.ts
336485
336545
  import { readFile as readFile16, stat as statAsync8, writeFile as writeFile9 } from "fs/promises";
336486
- import { extname as extname6, resolve as resolve25 } from "path";
336546
+ import { extname as extname6, resolve as resolve26 } from "path";
336487
336547
  async function applyEdits2(edits, tabId) {
336488
336548
  for (const edit of edits) {
336489
336549
  const blocked = isForbidden(edit.file);
@@ -336690,7 +336750,7 @@ function replaceInCode(source, escapedSymbol, newName, filePath) {
336690
336750
  async function locateSymbol(router2, symbol26, hint) {
336691
336751
  if (hint) {
336692
336752
  return {
336693
- file: resolve25(hint)
336753
+ file: resolve26(hint)
336694
336754
  };
336695
336755
  }
336696
336756
  const client = getIntelligenceClient();
@@ -336706,7 +336766,7 @@ async function locateSymbol(router2, symbol26, hint) {
336706
336766
  const exact = results.find((s) => s.name === symbol26);
336707
336767
  const match = exact ?? results[0];
336708
336768
  if (match) {
336709
- const resolved = resolve25(match.location.file);
336769
+ const resolved = resolve26(match.location.file);
336710
336770
  try {
336711
336771
  const st = await statAsync8(resolved);
336712
336772
  if (st.isFile())
@@ -336730,7 +336790,7 @@ async function locateSymbol(router2, symbol26, hint) {
336730
336790
  const best = matches2.sort((a, b) => b.split("/").length - a.split("/").length)[0];
336731
336791
  if (best)
336732
336792
  return {
336733
- file: resolve25(best)
336793
+ file: resolve26(best)
336734
336794
  };
336735
336795
  }
336736
336796
  } catch {}
@@ -336768,7 +336828,7 @@ async function findRemainingReferences(symbol26, definitionFile) {
336768
336828
  });
336769
336829
  const text2 = await new Response(proc.stdout).text();
336770
336830
  return text2.trim().split(`
336771
- `).filter(Boolean).map((f) => resolve25(f));
336831
+ `).filter(Boolean).map((f) => resolve26(f));
336772
336832
  } catch {
336773
336833
  return [];
336774
336834
  }
@@ -337144,7 +337204,7 @@ async function runPreCommitChecks(cwd2) {
337144
337204
  exitCode,
337145
337205
  stdout,
337146
337206
  stderr
337147
- } = await new Promise((resolve26) => {
337207
+ } = await new Promise((resolve27) => {
337148
337208
  const chunks = [];
337149
337209
  const errChunks = [];
337150
337210
  let lintBytes = 0;
@@ -337163,12 +337223,12 @@ async function runPreCommitChecks(cwd2) {
337163
337223
  if (lintBytes <= MAX_COLLECT_BYTES)
337164
337224
  errChunks.push(d.toString());
337165
337225
  });
337166
- proc.on("close", (code) => resolve26({
337226
+ proc.on("close", (code) => resolve27({
337167
337227
  exitCode: code,
337168
337228
  stdout: chunks.join(""),
337169
337229
  stderr: errChunks.join("")
337170
337230
  }));
337171
- proc.on("error", () => resolve26({
337231
+ proc.on("error", () => resolve27({
337172
337232
  exitCode: 1,
337173
337233
  stdout: "",
337174
337234
  stderr: "lint process error"
@@ -337385,7 +337445,7 @@ var init_shell = __esm(() => {
337385
337445
  };
337386
337446
  }
337387
337447
  const timeout = args2.timeout ?? DEFAULT_TIMEOUT;
337388
- return new Promise((resolve26) => {
337448
+ return new Promise((resolve27) => {
337389
337449
  const chunks = [];
337390
337450
  const errChunks = [];
337391
337451
  let stdoutBytes = 0;
@@ -337457,18 +337517,18 @@ var init_shell = __esm(() => {
337457
337517
  const output = hint ? `${stdout || stderr}
337458
337518
 
337459
337519
  ${hint}` : stdout || stderr;
337460
- resolve26({
337520
+ resolve27({
337461
337521
  success: true,
337462
337522
  output
337463
337523
  });
337464
337524
  } else if (code === null) {
337465
- resolve26({
337525
+ resolve27({
337466
337526
  success: false,
337467
337527
  output: stdout || stderr,
337468
337528
  error: `Command timed out after ${String(timeout / 1000)}s`
337469
337529
  });
337470
337530
  } else {
337471
- resolve26({
337531
+ resolve27({
337472
337532
  success: false,
337473
337533
  output: stdout,
337474
337534
  error: stderr || `Exit code: ${code}`
@@ -337476,7 +337536,7 @@ ${hint}` : stdout || stderr;
337476
337536
  }
337477
337537
  });
337478
337538
  proc.on("error", (err2) => {
337479
- resolve26({
337539
+ resolve27({
337480
337540
  success: false,
337481
337541
  output: err2.message,
337482
337542
  error: err2.message
@@ -337489,7 +337549,7 @@ ${hint}` : stdout || stderr;
337489
337549
 
337490
337550
  // src/core/skills/manager.ts
337491
337551
  import { existsSync as existsSync17, readdirSync as readdirSync5, readFileSync as readFileSync10, realpathSync as realpathSync2, rmSync as rmSync2, statSync as statSync4 } from "fs";
337492
- import { homedir as homedir14 } from "os";
337552
+ import { homedir as homedir15 } from "os";
337493
337553
  import { dirname as dirname9, join as join21 } from "path";
337494
337554
  async function searchSkills(query2) {
337495
337555
  const url2 = `https://skills.sh/api/search?q=${encodeURIComponent(query2)}`;
@@ -337559,13 +337619,13 @@ function listInstalledSkills() {
337559
337619
  const byName = new Map;
337560
337620
  const seenPaths = new Set;
337561
337621
  const dirs = [{
337562
- path: join21(homedir14(), ".soulforge", "skills"),
337622
+ path: join21(homedir15(), ".soulforge", "skills"),
337563
337623
  scope: "global"
337564
337624
  }, {
337565
- path: join21(homedir14(), ".agents", "skills"),
337625
+ path: join21(homedir15(), ".agents", "skills"),
337566
337626
  scope: "global"
337567
337627
  }, {
337568
- path: join21(homedir14(), ".claude", "skills"),
337628
+ path: join21(homedir15(), ".claude", "skills"),
337569
337629
  scope: "global"
337570
337630
  }, {
337571
337631
  path: join21(process.cwd(), ".soulforge", "skills"),
@@ -337922,7 +337982,7 @@ var init_skills = __esm(() => {
337922
337982
  import { execFile } from "child_process";
337923
337983
  import { extname as extname7, relative as relative8 } from "path";
337924
337984
  function execFileAsync(cmd, args2, opts) {
337925
- return new Promise((resolve26, reject) => {
337985
+ return new Promise((resolve27, reject) => {
337926
337986
  execFile(cmd, args2, {
337927
337987
  ...opts,
337928
337988
  encoding: "utf-8"
@@ -337930,7 +337990,7 @@ function execFileAsync(cmd, args2, opts) {
337930
337990
  if (err2)
337931
337991
  reject(err2);
337932
337992
  else
337933
- resolve26(stdout.trim());
337993
+ resolve27(stdout.trim());
337934
337994
  });
337935
337995
  });
337936
337996
  }
@@ -338691,7 +338751,7 @@ ${lines.join(`
338691
338751
 
338692
338752
  // src/core/tools/soul-find.ts
338693
338753
  import { spawn as spawn8 } from "child_process";
338694
- import { relative as relative9, resolve as resolve26 } from "path";
338754
+ import { relative as relative9, resolve as resolve27 } from "path";
338695
338755
  async function searchIntelligenceClient(repoMap, query2, cwd2, limit) {
338696
338756
  const fileMap = new Map;
338697
338757
  const words = query2.split(/\s+/).filter((w) => w.length >= 2);
@@ -338776,7 +338836,7 @@ async function searchIntelligenceClient(repoMap, query2, cwd2, limit) {
338776
338836
  existing.score += Math.min(co.count, 5);
338777
338837
  } else {
338778
338838
  fileMap.set(co.path, {
338779
- path: resolve26(cwd2, co.path),
338839
+ path: resolve27(cwd2, co.path),
338780
338840
  relPath: co.path,
338781
338841
  score: Math.min(co.count, 3),
338782
338842
  matchType: "file",
@@ -338939,7 +338999,7 @@ function fallbackFind(typeFilter) {
338939
338999
  async function enrichWithSymbols(repoMap, files, cwd2) {
338940
339000
  const results = [];
338941
339001
  for (const f of files) {
338942
- const rel = relative9(cwd2, resolve26(f));
339002
+ const rel = relative9(cwd2, resolve27(f));
338943
339003
  const syms = await repoMap.getFileSymbols(rel);
338944
339004
  const symStr = syms.length > 0 ? `
338945
339005
  ${syms.slice(0, 5).map((s) => `${s.kind} ${s.name}`).join(", ")}` : "";
@@ -338976,7 +339036,7 @@ var init_soul_find = __esm(() => {
338976
339036
  output: `No files matching "${query2}".`
338977
339037
  };
338978
339038
  }
338979
- const enriched = repoMap?.isReady ? await enrichWithSymbols(repoMap, fileResults, cwd2) : fileResults.map((f) => ` ${relative9(cwd2, resolve26(f))}`).join(`
339039
+ const enriched = repoMap?.isReady ? await enrichWithSymbols(repoMap, fileResults, cwd2) : fileResults.map((f) => ` ${relative9(cwd2, resolve27(f))}`).join(`
338980
339040
  `);
338981
339041
  return {
338982
339042
  success: true,
@@ -339063,7 +339123,7 @@ function filterForbiddenLines(output) {
339063
339123
  `) : "No matches found.";
339064
339124
  }
339065
339125
  function runCount(bin, args2) {
339066
- return new Promise((resolve27) => {
339126
+ return new Promise((resolve28) => {
339067
339127
  const proc = spawn9(bin, args2, {
339068
339128
  cwd: process.cwd(),
339069
339129
  timeout: 15000
@@ -339072,7 +339132,7 @@ function runCount(bin, args2) {
339072
339132
  proc.stdout.on("data", (d) => chunks.push(d.toString()));
339073
339133
  proc.on("close", (code) => {
339074
339134
  if (code !== 0 && code !== 1) {
339075
- resolve27({
339135
+ resolve28({
339076
339136
  success: false,
339077
339137
  output: "ripgrep failed",
339078
339138
  error: `exit ${String(code)}`
@@ -339081,7 +339141,7 @@ function runCount(bin, args2) {
339081
339141
  }
339082
339142
  const raw = chunks.join("");
339083
339143
  if (!raw.trim()) {
339084
- resolve27({
339144
+ resolve28({
339085
339145
  success: true,
339086
339146
  output: "0 matches."
339087
339147
  });
@@ -339109,14 +339169,14 @@ function runCount(bin, args2) {
339109
339169
  if (entries2.length > 25) {
339110
339170
  lines.push(` ... and ${String(entries2.length - 25)} more files`);
339111
339171
  }
339112
- resolve27({
339172
+ resolve28({
339113
339173
  success: true,
339114
339174
  output: lines.join(`
339115
339175
  `)
339116
339176
  });
339117
339177
  });
339118
339178
  proc.on("error", (err2) => {
339119
- resolve27({
339179
+ resolve28({
339120
339180
  success: false,
339121
339181
  output: err2.message,
339122
339182
  error: err2.message
@@ -339125,7 +339185,7 @@ function runCount(bin, args2) {
339125
339185
  });
339126
339186
  }
339127
339187
  async function runSearch(bin, args2) {
339128
- const rawOutput = await new Promise((resolve27) => {
339188
+ const rawOutput = await new Promise((resolve28) => {
339129
339189
  const proc = spawn9(bin, args2, {
339130
339190
  cwd: process.cwd(),
339131
339191
  timeout: 1e4
@@ -339150,13 +339210,13 @@ async function runSearch(bin, args2) {
339150
339210
  [output capped \u2014 narrow with glob or path params]`;
339151
339211
  }
339152
339212
  if (code === 0 || code === 1) {
339153
- resolve27(output || "No matches found.");
339213
+ resolve28(output || "No matches found.");
339154
339214
  } else {
339155
- resolve27(output || "No matches found.");
339215
+ resolve28(output || "No matches found.");
339156
339216
  }
339157
339217
  });
339158
339218
  proc.on("error", () => {
339159
- resolve27("No matches found.");
339219
+ resolve28("No matches found.");
339160
339220
  });
339161
339221
  });
339162
339222
  const sanitized = filterForbiddenLines(rawOutput);
@@ -339316,7 +339376,7 @@ Co-change only (related by git history, not imports):`);
339316
339376
  };
339317
339377
  }
339318
339378
  function execFileAsync2(cmd, args2, opts) {
339319
- return new Promise((resolve27, reject) => {
339379
+ return new Promise((resolve28, reject) => {
339320
339380
  execFile2(cmd, args2, {
339321
339381
  ...opts,
339322
339382
  encoding: "utf-8"
@@ -339324,7 +339384,7 @@ function execFileAsync2(cmd, args2, opts) {
339324
339384
  if (err2)
339325
339385
  reject(err2);
339326
339386
  else
339327
- resolve27(stdout.trim());
339387
+ resolve28(stdout.trim());
339328
339388
  });
339329
339389
  });
339330
339390
  }
@@ -339665,7 +339725,7 @@ ${added.join(`
339665
339725
 
339666
339726
  // src/core/tools/test-scaffold.ts
339667
339727
  import { access as access4, mkdir as mkdir5, stat as stat5, writeFile as writeFile10 } from "fs/promises";
339668
- import { basename as basename4, dirname as dirname10, extname as extname8, join as join23, relative as relative11, resolve as resolve27 } from "path";
339728
+ import { basename as basename4, dirname as dirname10, extname as extname8, join as join23, relative as relative11, resolve as resolve28 } from "path";
339669
339729
  async function fileExists(path) {
339670
339730
  try {
339671
339731
  await access4(path);
@@ -339715,7 +339775,7 @@ var init_test_scaffold = __esm(() => {
339715
339775
  try {
339716
339776
  const client = getIntelligenceClient();
339717
339777
  const router2 = getIntelligenceRouter(process.cwd());
339718
- const file2 = resolve27(args2.file);
339778
+ const file2 = resolve28(args2.file);
339719
339779
  const language = router2.detectLanguage(file2);
339720
339780
  const framework = args2.framework ?? await detectTestFramework(process.cwd());
339721
339781
  let outline;
@@ -339814,7 +339874,7 @@ var init_test_scaffold = __esm(() => {
339814
339874
  lines.push("");
339815
339875
  const content = lines.join(`
339816
339876
  `);
339817
- const resolvedOutput = resolve27(outputPath);
339877
+ const resolvedOutput = resolve28(outputPath);
339818
339878
  const blocked = isForbidden(resolvedOutput);
339819
339879
  if (blocked) {
339820
339880
  return {
@@ -340848,7 +340908,7 @@ var init_web_search2 = __esm(() => {
340848
340908
 
340849
340909
  // src/core/tools/bus-cache.ts
340850
340910
  import { readFile as readFileAsync } from "fs/promises";
340851
- import { resolve as resolve28 } from "path";
340911
+ import { resolve as resolve29 } from "path";
340852
340912
  function wrapWithBusCache(tools, bus, agentId, repoMap) {
340853
340913
  const wrapped = {
340854
340914
  ...tools
@@ -341024,7 +341084,7 @@ ${text2}`
341024
341084
  const result = await origEdit(args2, opts);
341025
341085
  const isOk = result && typeof result === "object" && result.success === true;
341026
341086
  if (isOk) {
341027
- readFileAsync(resolve28(normalized), "utf-8").then((fresh) => bus.updateFile(normalized, fresh, agentId), () => bus.invalidateFile(normalized));
341087
+ readFileAsync(resolve29(normalized), "utf-8").then((fresh) => bus.updateFile(normalized, fresh, agentId), () => bus.invalidateFile(normalized));
341028
341088
  } else {
341029
341089
  bus.invalidateFile(normalized);
341030
341090
  }
@@ -341063,7 +341123,7 @@ ${text2}`;
341063
341123
  const result = await origMultiEdit(args2, opts);
341064
341124
  const isOk = result && typeof result === "object" && result.success === true;
341065
341125
  if (isOk) {
341066
- readFileAsync(resolve28(normalized), "utf-8").then((fresh) => bus.updateFile(normalized, fresh, agentId), () => bus.invalidateFile(normalized));
341126
+ readFileAsync(resolve29(normalized), "utf-8").then((fresh) => bus.updateFile(normalized, fresh, agentId), () => bus.invalidateFile(normalized));
341067
341127
  } else {
341068
341128
  bus.invalidateFile(normalized);
341069
341129
  }
@@ -341375,7 +341435,7 @@ var init_interactive = __esm(() => {
341375
341435
  });
341376
341436
 
341377
341437
  // src/core/tools/index.ts
341378
- import { resolve as resolve29 } from "path";
341438
+ import { resolve as resolve30 } from "path";
341379
341439
  function deferExecute(fn) {
341380
341440
  return async (args2) => {
341381
341441
  await new Promise((r) => setTimeout(r, 0));
@@ -341497,7 +341557,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341497
341557
  fresh: freshField()
341498
341558
  }),
341499
341559
  execute: deferExecute(async (args2) => {
341500
- const normPath = resolve29(args2.path);
341560
+ const normPath = resolve30(args2.path);
341501
341561
  const isFullRead = args2.startLine == null && args2.endLine == null && !args2.target;
341502
341562
  if (!args2.fresh && fullReadCache.has(normPath)) {
341503
341563
  if (isFullRead) {
@@ -341548,7 +341608,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341548
341608
  lineStart: exports_external.preprocess(coerceInt, exports_external.number()).nullable().optional().transform(nullToUndef).describe("1-indexed start line from your last read_file output. " + "The range is derived from oldString line count \u2014 lineStart anchors where to look.")
341549
341609
  }),
341550
341610
  execute: deferExecute(async (args2) => {
341551
- const gate = await gateOutsideCwd("edit_file", resolve29(args2.path));
341611
+ const gate = await gateOutsideCwd("edit_file", resolve30(args2.path));
341552
341612
  if (gate.blocked)
341553
341613
  return gate.result;
341554
341614
  if (opts?.onApproveDestructive && isSensitiveFile(args2.path)) {
@@ -341562,7 +341622,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341562
341622
  };
341563
341623
  }
341564
341624
  }
341565
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
341625
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
341566
341626
  const result = await editFileTool.execute({
341567
341627
  ...args2,
341568
341628
  tabId: opts?.tabId
@@ -341615,7 +341675,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341615
341675
  })).describe("Array of edits to apply atomically")
341616
341676
  }),
341617
341677
  execute: deferExecute(async (args2) => {
341618
- const gate = await gateOutsideCwd("multi_edit", resolve29(args2.path));
341678
+ const gate = await gateOutsideCwd("multi_edit", resolve30(args2.path));
341619
341679
  if (gate.blocked)
341620
341680
  return gate.result;
341621
341681
  if (opts?.onApproveDestructive && isSensitiveFile(args2.path)) {
@@ -341629,7 +341689,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341629
341689
  };
341630
341690
  }
341631
341691
  }
341632
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
341692
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
341633
341693
  const result = await multiEditTool.execute({
341634
341694
  ...args2,
341635
341695
  tabId: opts?.tabId
@@ -341748,7 +341808,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341748
341808
  resetReadCounter();
341749
341809
  resetReadCache();
341750
341810
  if (args2.cwd) {
341751
- const gate = await gateOutsideCwd("shell", resolve29(args2.cwd));
341811
+ const gate = await gateOutsideCwd("shell", resolve30(args2.cwd));
341752
341812
  if (gate.blocked)
341753
341813
  return gate.result;
341754
341814
  }
@@ -341927,11 +341987,11 @@ ${crossTabWarning}` : `Shell: ${desc}
341927
341987
  }),
341928
341988
  execute: deferExecute(async (args2) => {
341929
341989
  if (args2.file) {
341930
- const gate = await gateOutsideCwd("rename_symbol", resolve29(args2.file));
341990
+ const gate = await gateOutsideCwd("rename_symbol", resolve30(args2.file));
341931
341991
  if (gate.blocked)
341932
341992
  return gate.result;
341933
341993
  }
341934
- const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.file)) : null;
341994
+ const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.file)) : null;
341935
341995
  const result = await renameSymbolTool.execute({
341936
341996
  ...args2,
341937
341997
  tabId: opts?.tabId
@@ -341951,11 +342011,11 @@ ${crossTabWarning}` : `Shell: ${desc}
341951
342011
  to: exports_external.string().describe("Target file path (created if it doesn't exist)")
341952
342012
  }),
341953
342013
  execute: deferExecute(async (args2) => {
341954
- const gate = await gateOutsideCwd("move_symbol", resolve29(args2.to));
342014
+ const gate = await gateOutsideCwd("move_symbol", resolve30(args2.to));
341955
342015
  if (gate.blocked)
341956
342016
  return gate.result;
341957
- const fromWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
341958
- const toWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.to));
342017
+ const fromWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.from));
342018
+ const toWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.to));
341959
342019
  const result = await moveSymbolTool.execute({
341960
342020
  ...args2,
341961
342021
  tabId: opts?.tabId
@@ -341974,10 +342034,10 @@ ${crossTabWarning}` : `Shell: ${desc}
341974
342034
  to: exports_external.string().describe("New file path")
341975
342035
  }),
341976
342036
  execute: deferExecute(async (args2) => {
341977
- const gate = await gateOutsideCwd("rename_file", resolve29(args2.to));
342037
+ const gate = await gateOutsideCwd("rename_file", resolve30(args2.to));
341978
342038
  if (gate.blocked)
341979
342039
  return gate.result;
341980
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
342040
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.from));
341981
342041
  const result = await renameFileTool.execute({
341982
342042
  ...args2,
341983
342043
  tabId: opts?.tabId
@@ -342002,11 +342062,11 @@ ${crossTabWarning}` : `Shell: ${desc}
342002
342062
  }),
342003
342063
  execute: deferExecute(async (args2) => {
342004
342064
  if (args2.file) {
342005
- const gate = await gateOutsideCwd("refactor", resolve29(args2.file));
342065
+ const gate = await gateOutsideCwd("refactor", resolve30(args2.file));
342006
342066
  if (gate.blocked)
342007
342067
  return gate.result;
342008
342068
  }
342009
- const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.file)) : null;
342069
+ const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.file)) : null;
342010
342070
  const result = await refactorTool.execute({
342011
342071
  ...args2,
342012
342072
  tabId: opts?.tabId
@@ -342060,7 +342120,7 @@ ${crossTabWarning}` : `Shell: ${desc}
342060
342120
  execute: deferExecute(async (args2) => {
342061
342121
  const result = await testScaffoldTool.execute(args2);
342062
342122
  if (result.success && args2.output) {
342063
- claimAfterCompoundEdit(opts?.tabId, opts?.tabLabel, [resolve29(args2.output)]);
342123
+ claimAfterCompoundEdit(opts?.tabId, opts?.tabLabel, [resolve30(args2.output)]);
342064
342124
  }
342065
342125
  return result;
342066
342126
  })
@@ -342443,7 +342503,7 @@ function buildSubagentCodeTools(opts) {
342443
342503
  lineStart: exports_external.preprocess(coerceInt, exports_external.number()).nullable().optional().transform(nullToUndef).describe("1-indexed start line from your last read_file output. " + "The range is derived from oldString line count \u2014 lineStart anchors where to look.")
342444
342504
  }),
342445
342505
  execute: deferExecute(async (args2) => {
342446
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
342506
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
342447
342507
  const result = await editFileTool.execute({
342448
342508
  ...args2,
342449
342509
  tabId: opts?.tabId
@@ -342470,7 +342530,7 @@ function buildSubagentCodeTools(opts) {
342470
342530
  })).describe("Array of edits to apply atomically")
342471
342531
  }),
342472
342532
  execute: deferExecute(async (args2) => {
342473
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
342533
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
342474
342534
  const result = await multiEditTool.execute({
342475
342535
  ...args2,
342476
342536
  tabId: opts?.tabId
@@ -342487,7 +342547,7 @@ function buildSubagentCodeTools(opts) {
342487
342547
  file: exports_external.string().nullable().optional().transform(nullToUndef).describe("File where the symbol is defined (optional)")
342488
342548
  }),
342489
342549
  execute: deferExecute(async (args2) => {
342490
- const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.file)) : null;
342550
+ const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.file)) : null;
342491
342551
  const result = await renameSymbolTool.execute({
342492
342552
  ...args2,
342493
342553
  tabId: opts?.tabId
@@ -342507,8 +342567,8 @@ function buildSubagentCodeTools(opts) {
342507
342567
  to: exports_external.string().describe("Target file path")
342508
342568
  }),
342509
342569
  execute: deferExecute(async (args2) => {
342510
- const fromWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
342511
- const toWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.to));
342570
+ const fromWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.from));
342571
+ const toWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.to));
342512
342572
  const result = await moveSymbolTool.execute({
342513
342573
  ...args2,
342514
342574
  tabId: opts?.tabId
@@ -342527,7 +342587,7 @@ function buildSubagentCodeTools(opts) {
342527
342587
  to: exports_external.string().describe("New file path")
342528
342588
  }),
342529
342589
  execute: deferExecute(async (args2) => {
342530
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
342590
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.from));
342531
342591
  const result = await renameFileTool.execute({
342532
342592
  ...args2,
342533
342593
  tabId: opts?.tabId
@@ -342551,7 +342611,7 @@ function buildSubagentCodeTools(opts) {
342551
342611
  apply: exports_external.boolean().nullable().optional().transform(nullToUndef).describe("Apply changes to disk (default true)")
342552
342612
  }),
342553
342613
  execute: deferExecute(async (args2) => {
342554
- const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.file)) : null;
342614
+ const warning = args2.file ? checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.file)) : null;
342555
342615
  const result = await refactorTool.execute({
342556
342616
  ...args2,
342557
342617
  tabId: opts?.tabId
@@ -343877,15 +343937,15 @@ function isRetryable(error48, abortSignal) {
343877
343937
  return lower.includes("overloaded") || lower.includes("rate limit") || lower.includes("429") || lower.includes("529") || lower.includes("503") || lower.includes("too many requests") || lower.includes("capacity") || lower.includes("timed out") || lower.includes("timeout") || lower.includes("etimedout") || lower.includes("econnreset") || lower.includes("econnrefused") || lower.includes("fetch failed") || lower.includes("failed to fetch") || lower.includes("cannot connect") || lower.includes("network") || lower.includes("socket hang up") || lower.includes("aborted");
343878
343938
  }
343879
343939
  function sleep(ms, signal) {
343880
- return new Promise((resolve30) => {
343940
+ return new Promise((resolve31) => {
343881
343941
  if (signal?.aborted) {
343882
- resolve30();
343942
+ resolve31();
343883
343943
  return;
343884
343944
  }
343885
- const timer = setTimeout(resolve30, ms);
343945
+ const timer = setTimeout(resolve31, ms);
343886
343946
  signal?.addEventListener("abort", () => {
343887
343947
  clearTimeout(timer);
343888
- resolve30();
343948
+ resolve31();
343889
343949
  }, {
343890
343950
  once: true
343891
343951
  });
@@ -345595,7 +345655,7 @@ ${postParts.join(`
345595
345655
  const inflightWaiters = [];
345596
345656
  const acquireConcurrencySlot = async () => {
345597
345657
  while (inflightCount >= MAX_CONCURRENT_AGENTS) {
345598
- await new Promise((resolve30) => inflightWaiters.push(resolve30));
345658
+ await new Promise((resolve31) => inflightWaiters.push(resolve31));
345599
345659
  }
345600
345660
  inflightCount++;
345601
345661
  };
@@ -351332,14 +351392,14 @@ var require_async_iterator = __commonJS((exports, module2) => {
351332
351392
  };
351333
351393
  }
351334
351394
  function readAndResolve(iter) {
351335
- var resolve30 = iter[kLastResolve];
351336
- if (resolve30 !== null) {
351395
+ var resolve31 = iter[kLastResolve];
351396
+ if (resolve31 !== null) {
351337
351397
  var data = iter[kStream].read();
351338
351398
  if (data !== null) {
351339
351399
  iter[kLastPromise] = null;
351340
351400
  iter[kLastResolve] = null;
351341
351401
  iter[kLastReject] = null;
351342
- resolve30(createIterResult(data, false));
351402
+ resolve31(createIterResult(data, false));
351343
351403
  }
351344
351404
  }
351345
351405
  }
@@ -351347,13 +351407,13 @@ var require_async_iterator = __commonJS((exports, module2) => {
351347
351407
  process.nextTick(readAndResolve, iter);
351348
351408
  }
351349
351409
  function wrapForNext(lastPromise, iter) {
351350
- return function(resolve30, reject) {
351410
+ return function(resolve31, reject) {
351351
351411
  lastPromise.then(function() {
351352
351412
  if (iter[kEnded]) {
351353
- resolve30(createIterResult(undefined, true));
351413
+ resolve31(createIterResult(undefined, true));
351354
351414
  return;
351355
351415
  }
351356
- iter[kHandlePromise](resolve30, reject);
351416
+ iter[kHandlePromise](resolve31, reject);
351357
351417
  }, reject);
351358
351418
  };
351359
351419
  }
@@ -351372,12 +351432,12 @@ var require_async_iterator = __commonJS((exports, module2) => {
351372
351432
  return Promise.resolve(createIterResult(undefined, true));
351373
351433
  }
351374
351434
  if (this[kStream].destroyed) {
351375
- return new Promise(function(resolve30, reject) {
351435
+ return new Promise(function(resolve31, reject) {
351376
351436
  process.nextTick(function() {
351377
351437
  if (_this[kError]) {
351378
351438
  reject(_this[kError]);
351379
351439
  } else {
351380
- resolve30(createIterResult(undefined, true));
351440
+ resolve31(createIterResult(undefined, true));
351381
351441
  }
351382
351442
  });
351383
351443
  });
@@ -351400,13 +351460,13 @@ var require_async_iterator = __commonJS((exports, module2) => {
351400
351460
  return this;
351401
351461
  }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
351402
351462
  var _this2 = this;
351403
- return new Promise(function(resolve30, reject) {
351463
+ return new Promise(function(resolve31, reject) {
351404
351464
  _this2[kStream].destroy(null, function(err2) {
351405
351465
  if (err2) {
351406
351466
  reject(err2);
351407
351467
  return;
351408
351468
  }
351409
- resolve30(createIterResult(undefined, true));
351469
+ resolve31(createIterResult(undefined, true));
351410
351470
  });
351411
351471
  });
351412
351472
  }), _Object$setPrototypeO), AsyncIteratorPrototype);
@@ -351428,15 +351488,15 @@ var require_async_iterator = __commonJS((exports, module2) => {
351428
351488
  value: stream._readableState.endEmitted,
351429
351489
  writable: true
351430
351490
  }), _defineProperty(_Object$create, kHandlePromise, {
351431
- value: function value(resolve30, reject) {
351491
+ value: function value(resolve31, reject) {
351432
351492
  var data = iterator[kStream].read();
351433
351493
  if (data) {
351434
351494
  iterator[kLastPromise] = null;
351435
351495
  iterator[kLastResolve] = null;
351436
351496
  iterator[kLastReject] = null;
351437
- resolve30(createIterResult(data, false));
351497
+ resolve31(createIterResult(data, false));
351438
351498
  } else {
351439
- iterator[kLastResolve] = resolve30;
351499
+ iterator[kLastResolve] = resolve31;
351440
351500
  iterator[kLastReject] = reject;
351441
351501
  }
351442
351502
  },
@@ -351455,12 +351515,12 @@ var require_async_iterator = __commonJS((exports, module2) => {
351455
351515
  iterator[kError] = err2;
351456
351516
  return;
351457
351517
  }
351458
- var resolve30 = iterator[kLastResolve];
351459
- if (resolve30 !== null) {
351518
+ var resolve31 = iterator[kLastResolve];
351519
+ if (resolve31 !== null) {
351460
351520
  iterator[kLastPromise] = null;
351461
351521
  iterator[kLastResolve] = null;
351462
351522
  iterator[kLastReject] = null;
351463
- resolve30(createIterResult(undefined, true));
351523
+ resolve31(createIterResult(undefined, true));
351464
351524
  }
351465
351525
  iterator[kEnded] = true;
351466
351526
  });
@@ -351472,7 +351532,7 @@ var require_async_iterator = __commonJS((exports, module2) => {
351472
351532
 
351473
351533
  // node_modules/readable-stream/lib/internal/streams/from.js
351474
351534
  var require_from = __commonJS((exports, module2) => {
351475
- function asyncGeneratorStep(gen, resolve30, reject, _next, _throw, key2, arg) {
351535
+ function asyncGeneratorStep(gen, resolve31, reject, _next, _throw, key2, arg) {
351476
351536
  try {
351477
351537
  var info2 = gen[key2](arg);
351478
351538
  var value = info2.value;
@@ -351481,7 +351541,7 @@ var require_from = __commonJS((exports, module2) => {
351481
351541
  return;
351482
351542
  }
351483
351543
  if (info2.done) {
351484
- resolve30(value);
351544
+ resolve31(value);
351485
351545
  } else {
351486
351546
  Promise.resolve(value).then(_next, _throw);
351487
351547
  }
@@ -351489,13 +351549,13 @@ var require_from = __commonJS((exports, module2) => {
351489
351549
  function _asyncToGenerator(fn) {
351490
351550
  return function() {
351491
351551
  var self2 = this, args2 = arguments;
351492
- return new Promise(function(resolve30, reject) {
351552
+ return new Promise(function(resolve31, reject) {
351493
351553
  var gen = fn.apply(self2, args2);
351494
351554
  function _next(value) {
351495
- asyncGeneratorStep(gen, resolve30, reject, _next, _throw, "next", value);
351555
+ asyncGeneratorStep(gen, resolve31, reject, _next, _throw, "next", value);
351496
351556
  }
351497
351557
  function _throw(err2) {
351498
- asyncGeneratorStep(gen, resolve30, reject, _next, _throw, "throw", err2);
351558
+ asyncGeneratorStep(gen, resolve31, reject, _next, _throw, "throw", err2);
351499
351559
  }
351500
351560
  _next(undefined);
351501
351561
  });
@@ -353335,11 +353395,11 @@ var require_awaitify = __commonJS((exports, module2) => {
353335
353395
  if (typeof args2[arity2 - 1] === "function") {
353336
353396
  return asyncFn.apply(this, args2);
353337
353397
  }
353338
- return new Promise((resolve30, reject) => {
353398
+ return new Promise((resolve31, reject) => {
353339
353399
  args2[arity2 - 1] = (err2, ...cbArgs) => {
353340
353400
  if (err2)
353341
353401
  return reject(err2);
353342
- resolve30(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
353402
+ resolve31(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
353343
353403
  };
353344
353404
  asyncFn.apply(this, args2);
353345
353405
  });
@@ -353955,11 +354015,11 @@ var require_diagnostics = __commonJS((exports, module2) => {
353955
354015
  }
353956
354016
  if (!async.length)
353957
354017
  return false;
353958
- return new Promise(function pinky(resolve30) {
354018
+ return new Promise(function pinky(resolve31) {
353959
354019
  Promise.all(async.map(function prebind(fn) {
353960
354020
  return fn(namespace);
353961
354021
  })).then(function resolved(values) {
353962
- resolve30(values.some(Boolean));
354022
+ resolve31(values.some(Boolean));
353963
354023
  });
353964
354024
  });
353965
354025
  }
@@ -357790,11 +357850,11 @@ var require_logger2 = __commonJS((exports) => {
357790
357850
  var require_Base = __commonJS((exports) => {
357791
357851
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
357792
357852
  function adopt(value) {
357793
- return value instanceof P ? value : new P(function(resolve30) {
357794
- resolve30(value);
357853
+ return value instanceof P ? value : new P(function(resolve31) {
357854
+ resolve31(value);
357795
357855
  });
357796
357856
  }
357797
- return new (P || (P = Promise))(function(resolve30, reject) {
357857
+ return new (P || (P = Promise))(function(resolve31, reject) {
357798
357858
  function fulfilled(value) {
357799
357859
  try {
357800
357860
  step(generator.next(value));
@@ -357810,7 +357870,7 @@ var require_Base = __commonJS((exports) => {
357810
357870
  }
357811
357871
  }
357812
357872
  function step(result) {
357813
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
357873
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
357814
357874
  }
357815
357875
  step((generator = generator.apply(thisArg, _arguments || [])).next());
357816
357876
  });
@@ -357827,7 +357887,7 @@ var require_Base = __commonJS((exports) => {
357827
357887
  constructor({ transport, data, logger, metadata: metadata2, client }) {
357828
357888
  super();
357829
357889
  this._isReady = Promise.resolve(false);
357830
- this[_a27] = (name21, args2 = []) => new Promise((resolve30, reject) => {
357890
+ this[_a27] = (name21, args2 = []) => new Promise((resolve31, reject) => {
357831
357891
  this.transport.request(name21, args2, (err2, res) => {
357832
357892
  if (this.logger.level === "debug") {
357833
357893
  let logData;
@@ -357841,7 +357901,7 @@ var require_Base = __commonJS((exports) => {
357841
357901
  if (err2) {
357842
357902
  reject(new Error(`${name21}: ${err2[1]}`));
357843
357903
  } else {
357844
- resolve30(res);
357904
+ resolve31(res);
357845
357905
  }
357846
357906
  });
357847
357907
  });
@@ -357921,11 +357981,11 @@ var require_Base = __commonJS((exports) => {
357921
357981
  var require_Buffer = __commonJS((exports) => {
357922
357982
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
357923
357983
  function adopt(value) {
357924
- return value instanceof P ? value : new P(function(resolve30) {
357925
- resolve30(value);
357984
+ return value instanceof P ? value : new P(function(resolve31) {
357985
+ resolve31(value);
357926
357986
  });
357927
357987
  }
357928
- return new (P || (P = Promise))(function(resolve30, reject) {
357988
+ return new (P || (P = Promise))(function(resolve31, reject) {
357929
357989
  function fulfilled(value) {
357930
357990
  try {
357931
357991
  step(generator.next(value));
@@ -357941,7 +358001,7 @@ var require_Buffer = __commonJS((exports) => {
357941
358001
  }
357942
358002
  }
357943
358003
  function step(result) {
357944
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
358004
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
357945
358005
  }
357946
358006
  step((generator = generator.apply(thisArg, _arguments || [])).next());
357947
358007
  });
@@ -358305,11 +358365,11 @@ var require_types2 = __commonJS((exports) => {
358305
358365
  var require_transport = __commonJS((exports) => {
358306
358366
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
358307
358367
  function adopt(value) {
358308
- return value instanceof P ? value : new P(function(resolve30) {
358309
- resolve30(value);
358368
+ return value instanceof P ? value : new P(function(resolve31) {
358369
+ resolve31(value);
358310
358370
  });
358311
358371
  }
358312
- return new (P || (P = Promise))(function(resolve30, reject) {
358372
+ return new (P || (P = Promise))(function(resolve31, reject) {
358313
358373
  function fulfilled(value) {
358314
358374
  try {
358315
358375
  step(generator.next(value));
@@ -358325,7 +358385,7 @@ var require_transport = __commonJS((exports) => {
358325
358385
  }
358326
358386
  }
358327
358387
  function step(result) {
358328
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
358388
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
358329
358389
  }
358330
358390
  step((generator = generator.apply(thisArg, _arguments || [])).next());
358331
358391
  });
@@ -358454,8 +358514,8 @@ var require_transport = __commonJS((exports) => {
358454
358514
  }
358455
358515
  close() {
358456
358516
  return __awaiter(this, undefined, undefined, function* () {
358457
- return new Promise((resolve30) => {
358458
- this.writer.end(resolve30);
358517
+ return new Promise((resolve31) => {
358518
+ this.writer.end(resolve31);
358459
358519
  });
358460
358520
  });
358461
358521
  }
@@ -358732,11 +358792,11 @@ var require_Neovim = __commonJS((exports) => {
358732
358792
  var require_client = __commonJS((exports) => {
358733
358793
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
358734
358794
  function adopt(value) {
358735
- return value instanceof P ? value : new P(function(resolve30) {
358736
- resolve30(value);
358795
+ return value instanceof P ? value : new P(function(resolve31) {
358796
+ resolve31(value);
358737
358797
  });
358738
358798
  }
358739
- return new (P || (P = Promise))(function(resolve30, reject) {
358799
+ return new (P || (P = Promise))(function(resolve31, reject) {
358740
358800
  function fulfilled(value) {
358741
358801
  try {
358742
358802
  step(generator.next(value));
@@ -358752,7 +358812,7 @@ var require_client = __commonJS((exports) => {
358752
358812
  }
358753
358813
  }
358754
358814
  function step(result) {
358755
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
358815
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
358756
358816
  }
358757
358817
  step((generator = generator.apply(thisArg, _arguments || [])).next());
358758
358818
  });
@@ -358857,12 +358917,12 @@ var require_client = __commonJS((exports) => {
358857
358917
  this._isReady = this.generateApi();
358858
358918
  }
358859
358919
  requestApi() {
358860
- return new Promise((resolve30, reject) => {
358920
+ return new Promise((resolve31, reject) => {
358861
358921
  this.transport.request("nvim_get_api_info", [], (err2, res) => {
358862
358922
  if (err2) {
358863
358923
  reject(err2);
358864
358924
  } else {
358865
- resolve30(res);
358925
+ resolve31(res);
358866
358926
  }
358867
358927
  });
358868
358928
  });
@@ -359028,11 +359088,11 @@ var require_properties = __commonJS((exports) => {
359028
359088
  var require_NvimPlugin = __commonJS((exports) => {
359029
359089
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
359030
359090
  function adopt(value) {
359031
- return value instanceof P ? value : new P(function(resolve30) {
359032
- resolve30(value);
359091
+ return value instanceof P ? value : new P(function(resolve31) {
359092
+ resolve31(value);
359033
359093
  });
359034
359094
  }
359035
- return new (P || (P = Promise))(function(resolve30, reject) {
359095
+ return new (P || (P = Promise))(function(resolve31, reject) {
359036
359096
  function fulfilled(value) {
359037
359097
  try {
359038
359098
  step(generator.next(value));
@@ -359048,7 +359108,7 @@ var require_NvimPlugin = __commonJS((exports) => {
359048
359108
  }
359049
359109
  }
359050
359110
  function step(result) {
359051
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
359111
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
359052
359112
  }
359053
359113
  step((generator = generator.apply(thisArg, _arguments || [])).next());
359054
359114
  });
@@ -360134,7 +360194,7 @@ __export(exports_neovim, {
360134
360194
  });
360135
360195
  import { spawn as spawn10 } from "child_process";
360136
360196
  import { existsSync as existsSync19, rmSync as rmSync3 } from "fs";
360137
- import { homedir as homedir15 } from "os";
360197
+ import { homedir as homedir16 } from "os";
360138
360198
  import { join as join26 } from "path";
360139
360199
  function setNeovimFileWrittenHandler(handler4) {
360140
360200
  _onFileWritten = handler4;
@@ -360144,7 +360204,7 @@ async function launchNeovim(nvimPath, cols = DEFAULT_COLS, rows = DEFAULT_ROWS,
360144
360204
  let effectivePath = nvimPath;
360145
360205
  const args2 = ["--embed", "-i", "NONE"];
360146
360206
  const isBundled = import.meta.url.includes("$bunfs");
360147
- const bundledInit = join26(homedir15(), ".soulforge", "init.lua");
360207
+ const bundledInit = join26(homedir16(), ".soulforge", "init.lua");
360148
360208
  const devInit = join26(import.meta.dir, "init.lua");
360149
360209
  const shippedInit = isBundled ? bundledInit : existsSync19(devInit) ? devInit : bundledInit;
360150
360210
  switch (configMode) {
@@ -360256,7 +360316,7 @@ function killBootstrap() {
360256
360316
  _bootstrapProc.kill();
360257
360317
  } catch {}
360258
360318
  _bootstrapProc = null;
360259
- const lazyDir = join26(homedir15(), ".local", "share", "soulforge", "lazy");
360319
+ const lazyDir = join26(homedir16(), ".local", "share", "soulforge", "lazy");
360260
360320
  try {
360261
360321
  rmSync3(lazyDir, {
360262
360322
  recursive: true,
@@ -360267,12 +360327,12 @@ function killBootstrap() {
360267
360327
  }
360268
360328
  function bootstrapNeovimPlugins(nvimPath) {
360269
360329
  const isBundled = import.meta.url.includes("$bunfs");
360270
- const bundledInit = join26(homedir15(), ".soulforge", "init.lua");
360330
+ const bundledInit = join26(homedir16(), ".soulforge", "init.lua");
360271
360331
  const devInit = join26(import.meta.dir, "init.lua");
360272
360332
  const shippedInit = isBundled ? bundledInit : existsSync19(devInit) ? devInit : bundledInit;
360273
360333
  if (!existsSync19(shippedInit))
360274
360334
  return;
360275
- const dataDir = join26(homedir15(), ".local", "share", "soulforge");
360335
+ const dataDir = join26(homedir16(), ".local", "share", "soulforge");
360276
360336
  const lazyDir = join26(dataDir, "lazy");
360277
360337
  if (existsSync19(lazyDir))
360278
360338
  return;
@@ -360674,7 +360734,7 @@ var init_prompts = __esm(() => {
360674
360734
  });
360675
360735
 
360676
360736
  // src/core/workers/intelligence-client.ts
360677
- import { homedir as homedir16 } from "os";
360737
+ import { homedir as homedir17 } from "os";
360678
360738
  import { join as join27 } from "path";
360679
360739
  var IS_COMPILED2, IS_DIST2, IntelligenceClient;
360680
360740
  var init_intelligence_client = __esm(() => {
@@ -360700,7 +360760,7 @@ var init_intelligence_client = __esm(() => {
360700
360760
  onStaleSymbols = null;
360701
360761
  static SCAN_IDLE_TIMEOUT = 120000;
360702
360762
  constructor(cwd2) {
360703
- const workerPath = IS_COMPILED2 ? join27(homedir16(), ".soulforge", "workers", "intelligence.worker.js") : IS_DIST2 ? join27(import.meta.dir, "workers", "intelligence.worker.js") : join27(import.meta.dir, "intelligence.worker.ts");
360763
+ const workerPath = IS_COMPILED2 ? join27(homedir17(), ".soulforge", "workers", "intelligence.worker.js") : IS_DIST2 ? join27(import.meta.dir, "workers", "intelligence.worker.js") : join27(import.meta.dir, "intelligence.worker.ts");
360704
360764
  super(workerPath, {
360705
360765
  cwd: cwd2
360706
360766
  });
@@ -360758,6 +360818,10 @@ var init_intelligence_client = __esm(() => {
360758
360818
  const d = data;
360759
360819
  this.onStaleSymbols?.(d.count);
360760
360820
  });
360821
+ this.on("index-error", (data) => {
360822
+ const d = data;
360823
+ logBackgroundError("Soul Map", d.message);
360824
+ });
360761
360825
  }
360762
360826
  get isReady() {
360763
360827
  return this._isReady;
@@ -360767,17 +360831,23 @@ var init_intelligence_client = __esm(() => {
360767
360831
  }
360768
360832
  async scan() {
360769
360833
  let timer;
360834
+ let rejectScan;
360770
360835
  const resetTimer = () => {
360771
360836
  if (timer)
360772
360837
  clearTimeout(timer);
360773
360838
  timer = setTimeout(() => {
360774
360839
  this.off("progress", resetTimer);
360840
+ const err2 = new Error("Soul map scan stalled \u2014 no progress for 2 minutes");
360841
+ logBackgroundError("Soul Map", err2.message);
360842
+ rejectScan?.(err2);
360775
360843
  }, IntelligenceClient.SCAN_IDLE_TIMEOUT);
360776
360844
  };
360777
360845
  this.on("progress", resetTimer);
360778
360846
  resetTimer();
360779
360847
  try {
360780
- await this.call("scan");
360848
+ await Promise.race([this.callWithTimeout(24 * 60 * 60000, "scan"), new Promise((_, reject) => {
360849
+ rejectScan = reject;
360850
+ })]);
360781
360851
  } catch (err2) {
360782
360852
  const msg = err2 instanceof Error ? err2.message : String(err2);
360783
360853
  logBackgroundError("Soul Map", `Scan failed: ${msg}`);
@@ -361474,13 +361544,13 @@ class ContextManager {
361474
361544
  return Promise.resolve(false);
361475
361545
  if (this.isRepoMapReady())
361476
361546
  return Promise.resolve(true);
361477
- return new Promise((resolve30) => {
361547
+ return new Promise((resolve31) => {
361478
361548
  const start2 = Date.now();
361479
361549
  const check2 = () => {
361480
361550
  if (this.isRepoMapReady())
361481
- return resolve30(true);
361551
+ return resolve31(true);
361482
361552
  if (Date.now() - start2 > timeoutMs)
361483
- return resolve30(false);
361553
+ return resolve31(false);
361484
361554
  setTimeout(check2, 200);
361485
361555
  };
361486
361556
  check2();
@@ -381143,7 +381213,7 @@ var init_instructions = __esm(() => {
381143
381213
 
381144
381214
  // src/headless/run.ts
381145
381215
  import { existsSync as existsSync23, readFileSync as readFileSync13 } from "fs";
381146
- import { resolve as resolve30 } from "path";
381216
+ import { resolve as resolve31 } from "path";
381147
381217
  async function setupAgent(opts, merged) {
381148
381218
  const cwd2 = opts.cwd ?? process.cwd();
381149
381219
  const mode = opts.mode ?? "default";
@@ -381435,7 +381505,7 @@ async function runPrompt(opts, merged) {
381435
381505
  if (opts.include && opts.include.length > 0) {
381436
381506
  const fileParts = [];
381437
381507
  for (const file2 of opts.include) {
381438
- const fullPath = resolve30(env.cwd, file2);
381508
+ const fullPath = resolve31(env.cwd, file2);
381439
381509
  if (!existsSync23(fullPath)) {
381440
381510
  stderrWarn(`--include file not found: ${file2}`);
381441
381511
  continue;
@@ -381594,7 +381664,7 @@ ${prompt}`;
381594
381664
  process.exit(exitCode);
381595
381665
  }
381596
381666
  function readPromptFromStdin() {
381597
- return new Promise((resolve31) => {
381667
+ return new Promise((resolve32) => {
381598
381668
  while (stdinBuf.includes(`
381599
381669
  `)) {
381600
381670
  const idx = stdinBuf.indexOf(`
@@ -381608,14 +381678,14 @@ ${stdinBuf}`;
381608
381678
  }
381609
381679
  const prompt = line2.trim();
381610
381680
  if (prompt.length > 0) {
381611
- resolve31(prompt);
381681
+ resolve32(prompt);
381612
381682
  return;
381613
381683
  }
381614
381684
  }
381615
381685
  if (stdinEnded) {
381616
381686
  const prompt = stdinBuf.trim();
381617
381687
  stdinBuf = "";
381618
- resolve31(prompt.length > 0 ? prompt : null);
381688
+ resolve32(prompt.length > 0 ? prompt : null);
381619
381689
  return;
381620
381690
  }
381621
381691
  if (process.stdin.isPaused())
@@ -381636,7 +381706,7 @@ ${stdinBuf}`;
381636
381706
  const prompt = line2.trim();
381637
381707
  cleanup();
381638
381708
  process.stdin.pause();
381639
- resolve31(prompt.length > 0 ? prompt : null);
381709
+ resolve32(prompt.length > 0 ? prompt : null);
381640
381710
  return;
381641
381711
  }
381642
381712
  };
@@ -381645,7 +381715,7 @@ ${stdinBuf}`;
381645
381715
  cleanup();
381646
381716
  const prompt = stdinBuf.trim();
381647
381717
  stdinBuf = "";
381648
- resolve31(prompt.length > 0 ? prompt : null);
381718
+ resolve32(prompt.length > 0 ? prompt : null);
381649
381719
  };
381650
381720
  function cleanup() {
381651
381721
  process.stdin.removeListener("data", onData);
@@ -382178,15 +382248,15 @@ function detectNerdFont() {
382178
382248
  existsSync: existsSync24
382179
382249
  } = __require("fs");
382180
382250
  const {
382181
- homedir: homedir17
382251
+ homedir: homedir18
382182
382252
  } = __require("os");
382183
382253
  const {
382184
382254
  join: join32
382185
382255
  } = __require("path");
382186
- const fontDir = join32(homedir17(), "Library", "Fonts");
382256
+ const fontDir = join32(homedir18(), "Library", "Fonts");
382187
382257
  if (existsSync24(join32(fontDir, "SymbolsNerdFont-Regular.ttf")))
382188
382258
  return true;
382189
- const linuxFontDir = join32(homedir17(), ".local", "share", "fonts");
382259
+ const linuxFontDir = join32(homedir18(), ".local", "share", "fonts");
382190
382260
  if (existsSync24(join32(linuxFontDir, "SymbolsNerdFont-Regular.ttf")))
382191
382261
  return true;
382192
382262
  } catch {}
@@ -382581,7 +382651,7 @@ import { EventEmitter } from "events";
382581
382651
  import { Buffer as Buffer2 } from "buffer";
382582
382652
  import { Buffer as Buffer3 } from "buffer";
382583
382653
  import { EventEmitter as EventEmitter2 } from "events";
382584
- import { resolve as resolve31, dirname as dirname11 } from "path";
382654
+ import { resolve as resolve32, dirname as dirname11 } from "path";
382585
382655
  import { fileURLToPath } from "url";
382586
382656
  import { resolve as resolve210, isAbsolute, parse as parse7 } from "path";
382587
382657
  import { existsSync as existsSync24 } from "fs";
@@ -385686,13 +385756,13 @@ class DebounceController {
385686
385756
  }
385687
385757
  debounce(id, ms, fn) {
385688
385758
  const scopeMap = TIMERS_MAP.get(this.scopeId);
385689
- return new Promise((resolve33, reject) => {
385759
+ return new Promise((resolve34, reject) => {
385690
385760
  if (scopeMap.has(id)) {
385691
385761
  clearTimeout(scopeMap.get(id));
385692
385762
  }
385693
385763
  const timerId = setTimeout(() => {
385694
385764
  try {
385695
- resolve33(fn());
385765
+ resolve34(fn());
385696
385766
  } catch (error48) {
385697
385767
  reject(error48);
385698
385768
  }
@@ -385782,25 +385852,25 @@ function getParsers() {
385782
385852
  filetype: "javascript",
385783
385853
  aliases: ["javascriptreact"],
385784
385854
  queries: {
385785
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default)]
385855
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default)]
385786
385856
  },
385787
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_javascript_default)
385857
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_javascript_default)
385788
385858
  },
385789
385859
  {
385790
385860
  filetype: "typescript",
385791
385861
  aliases: ["typescriptreact"],
385792
385862
  queries: {
385793
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default2)]
385863
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default2)]
385794
385864
  },
385795
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_typescript_default)
385865
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_typescript_default)
385796
385866
  },
385797
385867
  {
385798
385868
  filetype: "markdown",
385799
385869
  queries: {
385800
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default3)],
385801
- injections: [resolve31(dirname11(fileURLToPath(import.meta.url)), injections_default)]
385870
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default3)],
385871
+ injections: [resolve32(dirname11(fileURLToPath(import.meta.url)), injections_default)]
385802
385872
  },
385803
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_default),
385873
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_default),
385804
385874
  injectionMapping: {
385805
385875
  nodeTypes: {
385806
385876
  inline: "markdown_inline",
@@ -385823,16 +385893,16 @@ function getParsers() {
385823
385893
  {
385824
385894
  filetype: "markdown_inline",
385825
385895
  queries: {
385826
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default4)]
385896
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default4)]
385827
385897
  },
385828
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_inline_default)
385898
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_inline_default)
385829
385899
  },
385830
385900
  {
385831
385901
  filetype: "zig",
385832
385902
  queries: {
385833
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default5)]
385903
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default5)]
385834
385904
  },
385835
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_zig_default)
385905
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_zig_default)
385836
385906
  }
385837
385907
  ];
385838
385908
  }
@@ -396563,7 +396633,7 @@ var init_index_e89anq5x = __esm(async () => {
396563
396633
  if (this.initializePromise) {
396564
396634
  return this.initializePromise;
396565
396635
  }
396566
- this.initializePromise = new Promise((resolve33, reject) => {
396636
+ this.initializePromise = new Promise((resolve34, reject) => {
396567
396637
  const timeoutMs = this.options.initTimeout ?? 1e4;
396568
396638
  const timeoutId = setTimeout(() => {
396569
396639
  const error48 = new Error("Worker initialization timed out");
@@ -396571,7 +396641,7 @@ var init_index_e89anq5x = __esm(async () => {
396571
396641
  this.initializeResolvers = undefined;
396572
396642
  reject(error48);
396573
396643
  }, timeoutMs);
396574
- this.initializeResolvers = { resolve: resolve33, reject, timeoutId };
396644
+ this.initializeResolvers = { resolve: resolve34, reject, timeoutId };
396575
396645
  this.worker?.postMessage({
396576
396646
  type: "INIT",
396577
396647
  dataPath: this.options.dataPath
@@ -396612,8 +396682,8 @@ var init_index_e89anq5x = __esm(async () => {
396612
396682
  }
396613
396683
  async getPerformance() {
396614
396684
  const messageId = `performance_${this.messageIdCounter++}`;
396615
- return new Promise((resolve33) => {
396616
- this.messageCallbacks.set(messageId, resolve33);
396685
+ return new Promise((resolve34) => {
396686
+ this.messageCallbacks.set(messageId, resolve34);
396617
396687
  this.worker?.postMessage({ type: "GET_PERFORMANCE", messageId });
396618
396688
  });
396619
396689
  }
@@ -396626,8 +396696,8 @@ var init_index_e89anq5x = __esm(async () => {
396626
396696
  }
396627
396697
  }
396628
396698
  const messageId = `oneshot_${this.messageIdCounter++}`;
396629
- return new Promise((resolve33) => {
396630
- this.messageCallbacks.set(messageId, resolve33);
396699
+ return new Promise((resolve34) => {
396700
+ this.messageCallbacks.set(messageId, resolve34);
396631
396701
  this.worker?.postMessage({
396632
396702
  type: "ONESHOT_HIGHLIGHT",
396633
396703
  content,
@@ -396743,8 +396813,8 @@ var init_index_e89anq5x = __esm(async () => {
396743
396813
  }
396744
396814
  async preloadParser(filetype) {
396745
396815
  const messageId = `has_parser_${this.messageIdCounter++}`;
396746
- const response = await new Promise((resolve33) => {
396747
- this.messageCallbacks.set(messageId, resolve33);
396816
+ const response = await new Promise((resolve34) => {
396817
+ this.messageCallbacks.set(messageId, resolve34);
396748
396818
  this.worker?.postMessage({
396749
396819
  type: "PRELOAD_PARSER",
396750
396820
  filetype,
@@ -396771,8 +396841,8 @@ var init_index_e89anq5x = __esm(async () => {
396771
396841
  }
396772
396842
  this.buffers.set(id, { id, content, filetype, version: version2, hasParser: false });
396773
396843
  const messageId = `init_${this.messageIdCounter++}`;
396774
- const response = await new Promise((resolve33) => {
396775
- this.messageCallbacks.set(messageId, resolve33);
396844
+ const response = await new Promise((resolve34) => {
396845
+ this.messageCallbacks.set(messageId, resolve34);
396776
396846
  this.worker?.postMessage({
396777
396847
  type: "INITIALIZE_PARSER",
396778
396848
  bufferId: id,
@@ -396828,9 +396898,9 @@ var init_index_e89anq5x = __esm(async () => {
396828
396898
  this.editQueues.delete(bufferId);
396829
396899
  }
396830
396900
  if (this.worker) {
396831
- await new Promise((resolve33) => {
396901
+ await new Promise((resolve34) => {
396832
396902
  const messageId = `dispose_${bufferId}`;
396833
- this.messageCallbacks.set(messageId, resolve33);
396903
+ this.messageCallbacks.set(messageId, resolve34);
396834
396904
  try {
396835
396905
  this.worker.postMessage({
396836
396906
  type: "DISPOSE_BUFFER",
@@ -396838,13 +396908,13 @@ var init_index_e89anq5x = __esm(async () => {
396838
396908
  });
396839
396909
  } catch (error48) {
396840
396910
  console.error("Error disposing buffer", error48);
396841
- resolve33(false);
396911
+ resolve34(false);
396842
396912
  }
396843
396913
  setTimeout(() => {
396844
396914
  if (this.messageCallbacks.has(messageId)) {
396845
396915
  this.messageCallbacks.delete(messageId);
396846
396916
  console.warn({ bufferId }, "Timed out waiting for buffer to be disposed");
396847
- resolve33(false);
396917
+ resolve34(false);
396848
396918
  }
396849
396919
  }, 3000);
396850
396920
  });
@@ -396901,12 +396971,12 @@ var init_index_e89anq5x = __esm(async () => {
396901
396971
  this.options.dataPath = dataPath;
396902
396972
  if (this.initialized && this.worker) {
396903
396973
  const messageId = `update_datapath_${this.messageIdCounter++}`;
396904
- return new Promise((resolve33, reject) => {
396974
+ return new Promise((resolve34, reject) => {
396905
396975
  this.messageCallbacks.set(messageId, (response) => {
396906
396976
  if (response.error) {
396907
396977
  reject(new Error(response.error));
396908
396978
  } else {
396909
- resolve33();
396979
+ resolve34();
396910
396980
  }
396911
396981
  });
396912
396982
  this.worker.postMessage({
@@ -396922,12 +396992,12 @@ var init_index_e89anq5x = __esm(async () => {
396922
396992
  throw new Error("Cannot clear cache: client is not initialized");
396923
396993
  }
396924
396994
  const messageId = `clear_cache_${this.messageIdCounter++}`;
396925
- return new Promise((resolve33, reject) => {
396995
+ return new Promise((resolve34, reject) => {
396926
396996
  this.messageCallbacks.set(messageId, (response) => {
396927
396997
  if (response.error) {
396928
396998
  reject(new Error(response.error));
396929
396999
  } else {
396930
- resolve33();
397000
+ resolve34();
396931
397001
  }
396932
397002
  });
396933
397003
  this.worker.postMessage({
@@ -416880,8 +416950,8 @@ It can also happen if the client has a browser extension installed which messes
416880
416950
  currentEntangledActionThenable = {
416881
416951
  status: "pending",
416882
416952
  value: undefined,
416883
- then: function(resolve33) {
416884
- entangledListeners.push(resolve33);
416953
+ then: function(resolve34) {
416954
+ entangledListeners.push(resolve34);
416885
416955
  }
416886
416956
  };
416887
416957
  }
@@ -416905,8 +416975,8 @@ It can also happen if the client has a browser extension installed which messes
416905
416975
  status: "pending",
416906
416976
  value: null,
416907
416977
  reason: null,
416908
- then: function(resolve33) {
416909
- listeners.push(resolve33);
416978
+ then: function(resolve34) {
416979
+ listeners.push(resolve34);
416910
416980
  }
416911
416981
  };
416912
416982
  thenable.then(function() {
@@ -425526,7 +425596,7 @@ var init_shallow2 = __esm(() => {
425526
425596
 
425527
425597
  // src/core/commands/utils.ts
425528
425598
  import { existsSync as existsSync26, readdirSync as readdirSync7, statSync as statSync6 } from "fs";
425529
- import { homedir as homedir17 } from "os";
425599
+ import { homedir as homedir18 } from "os";
425530
425600
  import { join as join35 } from "path";
425531
425601
  function sysMsg(ctx, content) {
425532
425602
  ctx.chat.setMessages((prev) => [...prev, {
@@ -425564,7 +425634,7 @@ function fileSize(filePath) {
425564
425634
  }
425565
425635
  }
425566
425636
  function computeStorageSizes(cwd2) {
425567
- const home = homedir17();
425637
+ const home = homedir18();
425568
425638
  const projectDir = join35(cwd2, ".soulforge");
425569
425639
  const globalDir = join35(home, ".soulforge");
425570
425640
  const repoMap = fileSize(join35(projectDir, "repomap.db")) + fileSize(join35(projectDir, "repomap.db-wal")) + fileSize(join35(projectDir, "repomap.db-shm"));
@@ -425936,7 +426006,7 @@ __export(exports_terminal_font, {
425936
426006
  });
425937
426007
  import { execSync as execSync6 } from "child_process";
425938
426008
  import { existsSync as existsSync28, mkdirSync as mkdirSync10, readFileSync as readFileSync14, writeFileSync as writeFileSync8 } from "fs";
425939
- import { homedir as homedir18 } from "os";
426009
+ import { homedir as homedir19 } from "os";
425940
426010
  import { join as join36 } from "path";
425941
426011
  function detectTerminal() {
425942
426012
  const env2 = process.env;
@@ -426042,7 +426112,7 @@ function getCurrentFont() {
426042
426112
  const term = detectTerminal();
426043
426113
  switch (term.id) {
426044
426114
  case "kitty": {
426045
- const conf = join36(homedir18(), ".config", "kitty", "kitty.conf");
426115
+ const conf = join36(homedir19(), ".config", "kitty", "kitty.conf");
426046
426116
  if (!existsSync28(conf))
426047
426117
  return null;
426048
426118
  const content = readFileSync14(conf, "utf-8");
@@ -426058,7 +426128,7 @@ function getCurrentFont() {
426058
426128
  return match2?.[1] ?? null;
426059
426129
  }
426060
426130
  case "ghostty": {
426061
- const conf = join36(homedir18(), ".config", "ghostty", "config");
426131
+ const conf = join36(homedir19(), ".config", "ghostty", "config");
426062
426132
  if (!existsSync28(conf))
426063
426133
  return null;
426064
426134
  const content = readFileSync14(conf, "utf-8");
@@ -426066,7 +426136,7 @@ function getCurrentFont() {
426066
426136
  return match2?.[1]?.trim() ?? null;
426067
426137
  }
426068
426138
  case "foot": {
426069
- const conf = join36(homedir18(), ".config", "foot", "foot.ini");
426139
+ const conf = join36(homedir19(), ".config", "foot", "foot.ini");
426070
426140
  if (!existsSync28(conf))
426071
426141
  return null;
426072
426142
  const content = readFileSync14(conf, "utf-8");
@@ -426116,7 +426186,7 @@ function setTerminalFont(fontFamily, fontSize) {
426116
426186
  }
426117
426187
  }
426118
426188
  function setKittyFont(family, size) {
426119
- const confDir = join36(homedir18(), ".config", "kitty");
426189
+ const confDir = join36(homedir19(), ".config", "kitty");
426120
426190
  const conf = join36(confDir, "kitty.conf");
426121
426191
  mkdirSync10(confDir, {
426122
426192
  recursive: true
@@ -426150,11 +426220,11 @@ ${content}`;
426150
426220
  };
426151
426221
  }
426152
426222
  function findAlacrittyConfig() {
426153
- const paths = [join36(homedir18(), ".config", "alacritty", "alacritty.toml"), join36(homedir18(), ".config", "alacritty", "alacritty.yml"), join36(homedir18(), ".alacritty.toml"), join36(homedir18(), ".alacritty.yml")];
426223
+ const paths = [join36(homedir19(), ".config", "alacritty", "alacritty.toml"), join36(homedir19(), ".config", "alacritty", "alacritty.yml"), join36(homedir19(), ".alacritty.toml"), join36(homedir19(), ".alacritty.yml")];
426154
426224
  return paths.find((p2) => existsSync28(p2)) ?? null;
426155
426225
  }
426156
426226
  function setAlacrittyFont(family, size) {
426157
- const confDir = join36(homedir18(), ".config", "alacritty");
426227
+ const confDir = join36(homedir19(), ".config", "alacritty");
426158
426228
  let conf = findAlacrittyConfig();
426159
426229
  if (!conf) {
426160
426230
  conf = join36(confDir, "alacritty.toml");
@@ -426265,7 +426335,7 @@ function setTerminalAppFont(family, size) {
426265
426335
  }
426266
426336
  }
426267
426337
  function setGhosttyFont(family, size) {
426268
- const confDir = join36(homedir18(), ".config", "ghostty");
426338
+ const confDir = join36(homedir19(), ".config", "ghostty");
426269
426339
  const conf = join36(confDir, "config");
426270
426340
  mkdirSync10(confDir, {
426271
426341
  recursive: true
@@ -426291,7 +426361,7 @@ ${content}`;
426291
426361
  };
426292
426362
  }
426293
426363
  function setFootFont(family, size) {
426294
- const confDir = join36(homedir18(), ".config", "foot");
426364
+ const confDir = join36(homedir19(), ".config", "foot");
426295
426365
  const conf = join36(confDir, "foot.ini");
426296
426366
  mkdirSync10(confDir, {
426297
426367
  recursive: true
@@ -427986,10 +428056,10 @@ function getPerPidRssKB(pids) {
427986
428056
  if (pids.length === 0)
427987
428057
  return Promise.resolve(result);
427988
428058
  if (process.platform === "win32") {
427989
- return new Promise((resolve33) => {
428059
+ return new Promise((resolve34) => {
427990
428060
  execFile3("wmic", ["process", "where", `(${pids.map((p2) => `ProcessId=${String(p2)}`).join(" or ")})`, "get", "ProcessId,WorkingSetSize", "/format:csv"], (err2, stdout) => {
427991
428061
  if (err2) {
427992
- resolve33(result);
428062
+ resolve34(result);
427993
428063
  return;
427994
428064
  }
427995
428065
  for (const line2 of stdout.split(`
@@ -428005,14 +428075,14 @@ function getPerPidRssKB(pids) {
428005
428075
  }
428006
428076
  }
428007
428077
  }
428008
- resolve33(result);
428078
+ resolve34(result);
428009
428079
  });
428010
428080
  });
428011
428081
  }
428012
- return new Promise((resolve33) => {
428082
+ return new Promise((resolve34) => {
428013
428083
  execFile3("ps", ["-p", pids.join(","), "-o", "pid=,rss="], (err2, stdout) => {
428014
428084
  if (err2) {
428015
- resolve33(result);
428085
+ resolve34(result);
428016
428086
  return;
428017
428087
  }
428018
428088
  for (const line2 of stdout.split(`
@@ -428031,7 +428101,7 @@ function getPerPidRssKB(pids) {
428031
428101
  }
428032
428102
  }
428033
428103
  }
428034
- resolve33(result);
428104
+ resolve34(result);
428035
428105
  });
428036
428106
  });
428037
428107
  }
@@ -428402,7 +428472,7 @@ __export(exports_prerequisites, {
428402
428472
  });
428403
428473
  import { execSync as execSync7 } from "child_process";
428404
428474
  import { existsSync as existsSync29 } from "fs";
428405
- import { homedir as homedir19, platform as platform2 } from "os";
428475
+ import { homedir as homedir20, platform as platform2 } from "os";
428406
428476
  import { join as join37 } from "path";
428407
428477
  function commandExists3(cmd) {
428408
428478
  try {
@@ -428448,7 +428518,7 @@ function getMissingRequired() {
428448
428518
  var MASON_BIN, PREREQUISITES;
428449
428519
  var init_prerequisites = __esm(() => {
428450
428520
  init_install();
428451
- MASON_BIN = join37(homedir19(), ".local", "share", "nvim", "mason", "bin");
428521
+ MASON_BIN = join37(homedir20(), ".local", "share", "nvim", "mason", "bin");
428452
428522
  PREREQUISITES = [{
428453
428523
  name: "Neovim",
428454
428524
  description: "Embedded editor (required, v0.11+)",
@@ -432085,7 +432155,7 @@ var init_registry = __esm(() => {
432085
432155
  // src/core/terminal/suspend.ts
432086
432156
  import { spawn as spawn11 } from "child_process";
432087
432157
  function suspendAndRun(opts) {
432088
- return new Promise((resolve33) => {
432158
+ return new Promise((resolve34) => {
432089
432159
  if (process.stdin.isTTY) {
432090
432160
  process.stdin.setRawMode(false);
432091
432161
  }
@@ -432107,7 +432177,7 @@ function suspendAndRun(opts) {
432107
432177
  process.stdin.setRawMode(true);
432108
432178
  process.stdin.resume();
432109
432179
  }
432110
- resolve33({
432180
+ resolve34({
432111
432181
  exitCode: code
432112
432182
  });
432113
432183
  });
@@ -432119,7 +432189,7 @@ function suspendAndRun(opts) {
432119
432189
  process.stdin.setRawMode(true);
432120
432190
  process.stdin.resume();
432121
432191
  }
432122
- resolve33({
432192
+ resolve34({
432123
432193
  exitCode: null
432124
432194
  });
432125
432195
  });
@@ -438273,7 +438343,7 @@ INCLUDE the plan progress above VERBATIM in ## Current State so the agent knows
438273
438343
  const result = mutexRef.current.then(() => {
438274
438344
  if (autoApproveRef.current)
438275
438345
  return true;
438276
- return new Promise((resolve33) => {
438346
+ return new Promise((resolve34) => {
438277
438347
  setPendingQuestion({
438278
438348
  id: crypto.randomUUID(),
438279
438349
  question: questionFn(...args2),
@@ -438293,7 +438363,7 @@ INCLUDE the plan progress above VERBATIM in ## Current State so the agent knows
438293
438363
  const allowed = answer === "allow" || answer === "always";
438294
438364
  if (answer === "always")
438295
438365
  autoApproveRef.current = true;
438296
- resolve33(allowed);
438366
+ resolve34(allowed);
438297
438367
  }
438298
438368
  });
438299
438369
  });
@@ -438309,7 +438379,7 @@ ${label}`), []);
438309
438379
 
438310
438380
  ${path6}`), []);
438311
438381
  const promptDestructive = import_react32.useCallback((description) => {
438312
- return new Promise((resolve33) => {
438382
+ return new Promise((resolve34) => {
438313
438383
  setPendingQuestion({
438314
438384
  id: crypto.randomUUID(),
438315
438385
  question: `\u26A0 Potentially destructive action:
@@ -438325,7 +438395,7 @@ ${description}`,
438325
438395
  allowSkip: false,
438326
438396
  resolve: (answer) => {
438327
438397
  setPendingQuestion(null);
438328
- resolve33(answer === "allow");
438398
+ resolve34(answer === "allow");
438329
438399
  }
438330
438400
  });
438331
438401
  });
@@ -438356,7 +438426,7 @@ ${description}`,
438356
438426
  setSidebarPlan(updater);
438357
438427
  },
438358
438428
  onPlanReview: (plan, planFile, planContent) => {
438359
- return new Promise((resolve33) => {
438429
+ return new Promise((resolve34) => {
438360
438430
  setPendingPlanReview({
438361
438431
  plan,
438362
438432
  planFile,
@@ -438388,14 +438458,14 @@ ${description}`,
438388
438458
  reviseFeedback: action
438389
438459
  };
438390
438460
  }
438391
- resolve33(action);
438461
+ resolve34(action);
438392
438462
  abortRef.current?.abort();
438393
438463
  }
438394
438464
  });
438395
438465
  });
438396
438466
  },
438397
438467
  onAskUser: (question, options, allowSkip) => {
438398
- return new Promise((resolve33) => {
438468
+ return new Promise((resolve34) => {
438399
438469
  setPendingQuestion({
438400
438470
  id: crypto.randomUUID(),
438401
438471
  question,
@@ -438403,7 +438473,7 @@ ${description}`,
438403
438473
  allowSkip,
438404
438474
  resolve: (answer) => {
438405
438475
  setPendingQuestion(null);
438406
- resolve33(answer);
438476
+ resolve34(answer);
438407
438477
  }
438408
438478
  });
438409
438479
  });
@@ -438777,8 +438847,8 @@ ${description}`,
438777
438847
  content: `Retry ${String(retry + 1)}/${String(MAX_TRANSIENT_RETRIES)}: ${msg} [delay:${String(delaySec)}s]`,
438778
438848
  timestamp: Date.now()
438779
438849
  }]);
438780
- await new Promise((resolve33, reject) => {
438781
- const timer = setTimeout(resolve33, delay2);
438850
+ await new Promise((resolve34, reject) => {
438851
+ const timer = setTimeout(resolve34, delay2);
438782
438852
  const onAbort = () => {
438783
438853
  clearTimeout(timer);
438784
438854
  reject(new Error("aborted"));
@@ -439832,7 +439902,7 @@ function fuzzyFilter(pattern, entries2, limit = 50) {
439832
439902
  }
439833
439903
 
439834
439904
  // src/components/chat/InputBox.tsx
439835
- import { homedir as homedir20 } from "os";
439905
+ import { homedir as homedir21 } from "os";
439836
439906
  import { join as join41 } from "path";
439837
439907
  function getCommands() {
439838
439908
  if (!_commands) {
@@ -439986,7 +440056,7 @@ var init_InputBox = __esm(async () => {
439986
440056
  const historyStash = import_react34.useRef("");
439987
440057
  const getHistoryDB = import_react34.useCallback(() => {
439988
440058
  if (!historyDBRef.current) {
439989
- historyDBRef.current = new HistoryDB(join41(homedir20(), ".soulforge", "history.db"));
440059
+ historyDBRef.current = new HistoryDB(join41(homedir21(), ".soulforge", "history.db"));
439990
440060
  }
439991
440061
  return historyDBRef.current;
439992
440062
  }, []);
@@ -440592,8 +440662,8 @@ var init_InputBox = __esm(async () => {
440592
440662
 
440593
440663
  // src/core/utils/syntax.ts
440594
440664
  import { existsSync as existsSync32, readdirSync as readdirSync8 } from "fs";
440595
- import { homedir as homedir21 } from "os";
440596
- import { dirname as dirname16, join as join42, resolve as resolve33 } from "path";
440665
+ import { homedir as homedir22 } from "os";
440666
+ import { dirname as dirname16, join as join42, resolve as resolve34 } from "path";
440597
440667
  function discoverParsers() {
440598
440668
  const parsers = [];
440599
440669
  let dirs;
@@ -440605,13 +440675,13 @@ function discoverParsers() {
440605
440675
  return parsers;
440606
440676
  }
440607
440677
  for (const dir of dirs) {
440608
- const langDir = resolve33(coreAssetsDir, dir);
440678
+ const langDir = resolve34(coreAssetsDir, dir);
440609
440679
  const wasmFiles = readdirSync8(langDir).filter((f3) => f3.endsWith(".wasm"));
440610
440680
  const wasmFile = wasmFiles[0];
440611
440681
  if (!wasmFile)
440612
440682
  continue;
440613
- const highlights = resolve33(langDir, "highlights.scm");
440614
- const injections = resolve33(langDir, "injections.scm");
440683
+ const highlights = resolve34(langDir, "highlights.scm");
440684
+ const injections = resolve34(langDir, "injections.scm");
440615
440685
  const hasHighlights = existsSync32(highlights);
440616
440686
  const hasInjections = existsSync32(injections);
440617
440687
  if (!hasHighlights)
@@ -440624,7 +440694,7 @@ function discoverParsers() {
440624
440694
  injections: [injections]
440625
440695
  } : {}
440626
440696
  },
440627
- wasm: resolve33(langDir, wasmFile),
440697
+ wasm: resolve34(langDir, wasmFile),
440628
440698
  ...TS_ALIASES[dir] ? {
440629
440699
  aliases: TS_ALIASES[dir]
440630
440700
  } : {},
@@ -440641,7 +440711,7 @@ function discoverParsers() {
440641
440711
  queries: {
440642
440712
  highlights: [highlights]
440643
440713
  },
440644
- wasm: resolve33(langDir, wasmFile)
440714
+ wasm: resolve34(langDir, wasmFile)
440645
440715
  });
440646
440716
  }
440647
440717
  }
@@ -440665,7 +440735,7 @@ var init_syntax = __esm(async () => {
440665
440735
  await init_core4();
440666
440736
  IS_COMPILED3 = import.meta.url.includes("$bunfs");
440667
440737
  IS_DIST3 = !IS_COMPILED3 && import.meta.dir.includes("/dist");
440668
- bundledAssets = join42(homedir21(), ".soulforge", "opentui-assets");
440738
+ bundledAssets = join42(homedir22(), ".soulforge", "opentui-assets");
440669
440739
  distAssets = join42(import.meta.dir, "opentui-assets");
440670
440740
  if (IS_COMPILED3) {
440671
440741
  coreAssetsDir = bundledAssets;
@@ -440673,7 +440743,7 @@ var init_syntax = __esm(async () => {
440673
440743
  coreAssetsDir = existsSync32(distAssets) ? distAssets : bundledAssets;
440674
440744
  } else {
440675
440745
  try {
440676
- coreAssetsDir = resolve33(dirname16(__require.resolve("@opentui/core")), "assets");
440746
+ coreAssetsDir = resolve34(dirname16(__require.resolve("@opentui/core")), "assets");
440677
440747
  } catch {
440678
440748
  coreAssetsDir = bundledAssets;
440679
440749
  }
@@ -440732,10 +440802,10 @@ var init_syntax = __esm(async () => {
440732
440802
  };
440733
440803
  addDefaultParsers(discoverParsers());
440734
440804
  if (IS_COMPILED3) {
440735
- process.env.OTUI_TREE_SITTER_WORKER_PATH = join42(homedir21(), ".soulforge", "opentui-assets", "parser.worker.js");
440805
+ process.env.OTUI_TREE_SITTER_WORKER_PATH = join42(homedir22(), ".soulforge", "opentui-assets", "parser.worker.js");
440736
440806
  } else if (IS_DIST3) {
440737
440807
  try {
440738
- const coreWorker = resolve33(dirname16(__require.resolve("@opentui/core")), "parser.worker.js");
440808
+ const coreWorker = resolve34(dirname16(__require.resolve("@opentui/core")), "parser.worker.js");
440739
440809
  if (existsSync32(coreWorker)) {
440740
440810
  process.env.OTUI_TREE_SITTER_WORKER_PATH = coreWorker;
440741
440811
  }
@@ -444617,7 +444687,7 @@ var init_ToolCallDisplay = __esm(async () => {
444617
444687
  });
444618
444688
 
444619
444689
  // src/components/chat/tool-formatters.ts
444620
- import { resolve as resolve34 } from "path";
444690
+ import { resolve as resolve35 } from "path";
444621
444691
  function formatArgs(toolName, args2) {
444622
444692
  if (!args2)
444623
444693
  return "";
@@ -445019,7 +445089,7 @@ function detectOutsideCwd(toolName, args2) {
445019
445089
  const parsed = JSON.parse(args2);
445020
445090
  for (const val of Object.values(parsed)) {
445021
445091
  if (typeof val === "string" && (val.startsWith("/") || val.startsWith("~"))) {
445022
- const resolved = resolve34(val);
445092
+ const resolved = resolve35(val);
445023
445093
  const kind = classifyPath(resolved, CWD);
445024
445094
  if (kind)
445025
445095
  return kind;
@@ -471716,7 +471786,7 @@ var init_EditorSettings = __esm(async () => {
471716
471786
  // src/core/intelligence/backends/lsp/installer.ts
471717
471787
  import { execSync as execSync8, spawn as spawn14 } from "child_process";
471718
471788
  import { chmodSync as chmodSync4, existsSync as existsSync33, mkdirSync as mkdirSync13, readFileSync as readFileSync15, unlinkSync as unlinkSync3, writeFileSync as writeFileSync10 } from "fs";
471719
- import { homedir as homedir22 } from "os";
471789
+ import { homedir as homedir23 } from "os";
471720
471790
  import { join as join45 } from "path";
471721
471791
  function parsePurl(id) {
471722
471792
  const match2 = id.match(/^pkg:(\w+)\/(.+?)@(.+)$/);
@@ -471790,7 +471860,7 @@ function loadRegistry() {
471790
471860
  return [];
471791
471861
  }
471792
471862
  async function downloadRegistry() {
471793
- mkdirSync13(join45(homedir22(), ".soulforge"), {
471863
+ mkdirSync13(join45(homedir23(), ".soulforge"), {
471794
471864
  recursive: true
471795
471865
  });
471796
471866
  try {
@@ -471810,17 +471880,17 @@ async function downloadRegistry() {
471810
471880
  if (!zipResp.ok)
471811
471881
  throw new Error(`Download HTTP ${String(zipResp.status)}`);
471812
471882
  const zipBuf = await zipResp.arrayBuffer();
471813
- const tmpZip = join45(homedir22(), ".soulforge", "mason-registry.zip");
471883
+ const tmpZip = join45(homedir23(), ".soulforge", "mason-registry.zip");
471814
471884
  writeFileSync10(tmpZip, Buffer.from(zipBuf));
471815
471885
  const {
471816
471886
  execSync: execSync9
471817
471887
  } = await import("child_process");
471818
- execSync9(`unzip -qo "${tmpZip}" registry.json -d "${join45(homedir22(), ".soulforge")}"`, {
471888
+ execSync9(`unzip -qo "${tmpZip}" registry.json -d "${join45(homedir23(), ".soulforge")}"`, {
471819
471889
  stdio: "ignore",
471820
471890
  timeout: 1e4
471821
471891
  });
471822
471892
  unlinkSync3(tmpZip);
471823
- const jsonPath = join45(homedir22(), ".soulforge", "registry.json");
471893
+ const jsonPath = join45(homedir23(), ".soulforge", "registry.json");
471824
471894
  const text3 = readFileSync15(jsonPath, "utf-8");
471825
471895
  writeFileSync10(REGISTRY_CACHE, text3);
471826
471896
  unlinkSync3(jsonPath);
@@ -471967,7 +472037,7 @@ async function installPackage(pkg, onProgress) {
471967
472037
  });
471968
472038
  return "bun";
471969
472039
  } catch {
471970
- const sfBin = join45(homedir22(), ".soulforge", "bin", "bun");
472040
+ const sfBin = join45(homedir23(), ".soulforge", "bin", "bun");
471971
472041
  if (existsSync33(sfBin))
471972
472042
  return sfBin;
471973
472043
  return "bun";
@@ -472217,7 +472287,7 @@ function resolveAssetTemplate(template, version2) {
472217
472287
  return template.replace(/\{\{\s*version\s*\}\}/g, version2).replace(/\{\{\s*version\s*\|\s*strip_prefix\s*"v"\s*\}\}/g, version2.replace(/^v/, ""));
472218
472288
  }
472219
472289
  function runCommand(cmd, args2, log, extraEnv) {
472220
- return new Promise((resolve35, reject) => {
472290
+ return new Promise((resolve36, reject) => {
472221
472291
  const proc = spawn14(cmd, args2, {
472222
472292
  stdio: ["ignore", "pipe", "pipe"],
472223
472293
  env: {
@@ -472236,7 +472306,7 @@ function runCommand(cmd, args2, log, extraEnv) {
472236
472306
  });
472237
472307
  proc.on("close", (code) => {
472238
472308
  if (code === 0) {
472239
- resolve35();
472309
+ resolve36();
472240
472310
  } else {
472241
472311
  reject(new Error(`${cmd} exited with code ${String(code)}: ${stderr.slice(0, 500).trim()}`));
472242
472312
  }
@@ -472248,10 +472318,10 @@ function runCommand(cmd, args2, log, extraEnv) {
472248
472318
  }
472249
472319
  var SOULFORGE_LSP_DIR, MASON_REGISTRY_LOCAL, MASON_REGISTRY_RELEASE_URL = "https://api.github.com/repos/mason-org/mason-registry/releases/latest", REGISTRY_CACHE, MASON_BIN_DIR2, registryCache = null, pathCache, PROJECT_INDICATORS;
472250
472320
  var init_installer = __esm(() => {
472251
- SOULFORGE_LSP_DIR = join45(homedir22(), ".soulforge", "lsp-servers");
472252
- MASON_REGISTRY_LOCAL = join45(homedir22(), ".local", "share", "nvim", "mason", "registries", "github", "mason-org", "mason-registry", "registry.json");
472253
- REGISTRY_CACHE = join45(homedir22(), ".soulforge", "mason-registry.json");
472254
- MASON_BIN_DIR2 = join45(homedir22(), ".local", "share", "soulforge", "mason", "bin");
472321
+ SOULFORGE_LSP_DIR = join45(homedir23(), ".soulforge", "lsp-servers");
472322
+ MASON_REGISTRY_LOCAL = join45(homedir23(), ".local", "share", "nvim", "mason", "registries", "github", "mason-org", "mason-registry", "registry.json");
472323
+ REGISTRY_CACHE = join45(homedir23(), ".soulforge", "mason-registry.json");
472324
+ MASON_BIN_DIR2 = join45(homedir23(), ".local", "share", "soulforge", "mason", "bin");
472255
472325
  pathCache = new Map;
472256
472326
  PROJECT_INDICATORS = {
472257
472327
  TypeScript: ["tsconfig.json", "*.ts", "*.tsx"],
@@ -477819,7 +477889,7 @@ init_theme();
477819
477889
  init_splash();
477820
477890
  init_errors();
477821
477891
  import { existsSync as existsSync36, readFileSync as readFileSync16 } from "fs";
477822
- import { homedir as homedir23 } from "os";
477892
+ import { homedir as homedir24 } from "os";
477823
477893
  import { join as join49 } from "path";
477824
477894
  globalThis.AI_SDK_LOG_WARNINGS = false;
477825
477895
  var cliArgs = process.argv.slice(2);
@@ -477836,7 +477906,7 @@ if (hasCli) {
477836
477906
  }
477837
477907
  var isCompiledBinary = import.meta.url.includes("$bunfs");
477838
477908
  if (isCompiledBinary) {
477839
- const bundledWorker = join49(homedir23(), ".soulforge", "opentui-assets", "parser.worker.js");
477909
+ const bundledWorker = join49(homedir24(), ".soulforge", "opentui-assets", "parser.worker.js");
477840
477910
  if (!process.env.OTUI_TREE_SITTER_WORKER_PATH && existsSync36(bundledWorker)) {
477841
477911
  process.env.OTUI_TREE_SITTER_WORKER_PATH = bundledWorker;
477842
477912
  }
@@ -477853,7 +477923,7 @@ function rgb(hex3) {
477853
477923
  return `\x1B[38;2;${n >> 16 & 255};${n >> 8 & 255};${n & 255}m`;
477854
477924
  }
477855
477925
  try {
477856
- const raw2 = readFileSync16(join49(homedir23(), ".soulforge", "config.json"), "utf-8");
477926
+ const raw2 = readFileSync16(join49(homedir24(), ".soulforge", "config.json"), "utf-8");
477857
477927
  const cfg = JSON.parse(raw2);
477858
477928
  if (cfg.theme?.name)
477859
477929
  applyTheme(cfg.theme.name, cfg.theme?.transparent, {
@@ -477874,7 +477944,7 @@ var cols = process.stdout.columns ?? 80;
477874
477944
  var rows = process.stdout.rows ?? 24;
477875
477945
  var GHOST = (() => {
477876
477946
  try {
477877
- const raw2 = readFileSync16(join49(homedir23(), ".soulforge", "config.json"), "utf-8");
477947
+ const raw2 = readFileSync16(join49(homedir24(), ".soulforge", "config.json"), "utf-8");
477878
477948
  const cfg = JSON.parse(raw2);
477879
477949
  if (cfg.nerdFont === true)
477880
477950
  return "\uDB80\uDEA0";