@proxysoul/soulforge 1.5.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -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.2",
57817
+ version: "1.6.0",
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,13 +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
- return collectFilesWalk(dir, depth);
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
+ };
312190
312211
  }
312191
312212
  async function collectFilesViaGit(dir) {
312192
312213
  try {
@@ -312195,8 +312216,12 @@ async function collectFilesViaGit(dir) {
312195
312216
  stdout: "pipe",
312196
312217
  stderr: "ignore"
312197
312218
  });
312219
+ const code = await Promise.race([proc.exited, new Promise((r) => setTimeout(() => r("timeout"), 30000))]);
312220
+ if (code === "timeout") {
312221
+ proc.kill();
312222
+ return null;
312223
+ }
312198
312224
  const text2 = await new Response(proc.stdout).text();
312199
- const code = await proc.exited;
312200
312225
  if (code !== 0)
312201
312226
  return null;
312202
312227
  const files = [];
@@ -312226,20 +312251,25 @@ async function collectFilesViaGit(dir) {
312226
312251
  return null;
312227
312252
  }
312228
312253
  }
312229
- async function collectFilesWalk(dir, depth) {
312254
+ async function collectFilesWalk(dir, depth, counter, out2) {
312230
312255
  if (depth > MAX_DEPTH)
312231
312256
  return [];
312232
- const files = [];
312257
+ const ctx = counter ?? {
312258
+ n: 0
312259
+ };
312260
+ const files = out2 ?? [];
312233
312261
  try {
312234
312262
  for (const entry of await readdir2(dir, {
312235
312263
  withFileTypes: true
312236
312264
  })) {
312265
+ if (ctx.n >= WALK_FILE_CAP)
312266
+ break;
312237
312267
  if (entry.name.startsWith(".") && entry.name !== ".")
312238
312268
  continue;
312239
312269
  const fullPath = join15(dir, entry.name);
312240
312270
  if (entry.isDirectory()) {
312241
312271
  if (!IGNORED_DIRS.has(entry.name)) {
312242
- files.push(...await collectFilesWalk(fullPath, depth + 1));
312272
+ await collectFilesWalk(fullPath, depth + 1, ctx, files);
312243
312273
  }
312244
312274
  } else if (entry.isFile()) {
312245
312275
  if (isForbidden(fullPath))
@@ -312248,21 +312278,23 @@ async function collectFilesWalk(dir, depth) {
312248
312278
  if (ext in INDEXABLE_EXTENSIONS) {
312249
312279
  try {
312250
312280
  const s = await stat2(fullPath);
312251
- if (s.size < MAX_FILE_SIZE)
312281
+ if (s.size < MAX_FILE_SIZE) {
312252
312282
  files.push({
312253
312283
  path: fullPath,
312254
312284
  mtimeMs: s.mtimeMs
312255
312285
  });
312286
+ ctx.n++;
312287
+ }
312256
312288
  } catch {}
312257
312289
  }
312258
312290
  }
312259
- if (files.length % 50 === 0)
312291
+ if (ctx.n % 50 === 0)
312260
312292
  await new Promise((r) => setTimeout(r, 0));
312261
312293
  }
312262
312294
  } catch {}
312263
312295
  return files;
312264
312296
  }
312265
- 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;
312266
312298
  var init_repo_map_utils = __esm(() => {
312267
312299
  init_file_tree();
312268
312300
  init_forbidden();
@@ -312339,6 +312371,7 @@ var init_repo_map_utils = __esm(() => {
312339
312371
  NON_CODE_LANGUAGES = new Set(["unknown", "css", "html", "json", "toml", "yaml", "dockerfile"]);
312340
312372
  IMPORT_TRACKABLE_LANGUAGES = new Set(["typescript", "javascript", "python", "go", "rust", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "ocaml", "objc", "solidity"]);
312341
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"]);
312342
312375
  });
312343
312376
 
312344
312377
  // src/core/intelligence/repo-map.ts
@@ -312346,7 +312379,7 @@ import { Database as Database2 } from "bun:sqlite";
312346
312379
  import { execSync as execSync4 } from "child_process";
312347
312380
  import { chmodSync as chmodSync3, existsSync as existsSync15, mkdirSync as mkdirSync8, readFileSync as readFileSync9, statSync } from "fs";
312348
312381
  import { stat as statAsync } from "fs/promises";
312349
- 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";
312350
312383
 
312351
312384
  class RepoMap {
312352
312385
  db;
@@ -312367,6 +312400,8 @@ class RepoMap {
312367
312400
  onProgress = null;
312368
312401
  onScanComplete = null;
312369
312402
  onStaleSymbols = null;
312403
+ onError = null;
312404
+ indexErrors = 0;
312370
312405
  constructor(cwd) {
312371
312406
  this.cwd = cwd;
312372
312407
  const dbDir = join16(cwd, ".soulforge");
@@ -312621,9 +312656,19 @@ class RepoMap {
312621
312656
  }
312622
312657
  async doScan() {
312623
312658
  const tick = () => new Promise((r) => setTimeout(r, 1));
312659
+ this.indexErrors = 0;
312624
312660
  try {
312625
- const allFiles = await collectFiles(this.cwd);
312626
- 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
+ }
312627
312672
  const existingFiles = new Map;
312628
312673
  for (const row of this.db.query("SELECT id, path, mtime_ms FROM files").all()) {
312629
312674
  existingFiles.set(row.path, {
@@ -312665,7 +312710,12 @@ class RepoMap {
312665
312710
  if (file2) {
312666
312711
  try {
312667
312712
  await this.indexFile(file2.absPath, file2.relPath, file2.mtime, file2.language);
312668
- } 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
+ }
312669
312719
  }
312670
312720
  if (i2 % 5 === 0) {
312671
312721
  this.onProgress?.(i2 + 1, toIndex.length);
@@ -312711,12 +312761,12 @@ class RepoMap {
312711
312761
  const {
312712
312762
  execFile
312713
312763
  } = await import("child_process");
312714
- const output = await new Promise((resolve10) => {
312764
+ const output = await new Promise((resolve11) => {
312715
312765
  execFile("git", ["log", "--all", "--name-only", "--format=", "-n", "1000"], {
312716
312766
  cwd: this.cwd,
312717
312767
  timeout: 1e4,
312718
312768
  maxBuffer: 5000000
312719
- }, (err2, stdout) => resolve10(err2 ? "" : stdout));
312769
+ }, (err2, stdout) => resolve11(err2 ? "" : stdout));
312720
312770
  });
312721
312771
  let rank = 0;
312722
312772
  for (const line of output.split(`
@@ -312753,7 +312803,9 @@ class RepoMap {
312753
312803
  const backend = new TreeSitterBackend2;
312754
312804
  await Promise.race([backend.initialize(this.cwd), new Promise((_, reject) => setTimeout(() => reject(new Error("tree-sitter init timeout")), 15000))]);
312755
312805
  this.treeSitter = backend;
312756
- } catch {}
312806
+ } catch (err2) {
312807
+ this.onError?.(`Tree-sitter init failed: ${err2 instanceof Error ? err2.message : String(err2)} \u2014 indexing without AST symbols`);
312808
+ }
312757
312809
  }
312758
312810
  async indexFile(absPath, relPath, mtime, language) {
312759
312811
  const existing = this.db.query("SELECT id FROM files WHERE path = ?").get(relPath);
@@ -312782,8 +312834,15 @@ class RepoMap {
312782
312834
  let outline = null;
312783
312835
  if (this.treeSitter) {
312784
312836
  try {
312785
- outline = await Promise.race([this.treeSitter.getFileOutline(absPath), new Promise((r) => setTimeout(r, 5000, null))]) ?? null;
312786
- } 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
+ }
312787
312846
  }
312788
312847
  const symbolCount = outline?.symbols.length ?? 0;
312789
312848
  if (existing) {
@@ -312798,8 +312857,12 @@ class RepoMap {
312798
312857
  const seen = new Set;
312799
312858
  const lines = content.split(`
312800
312859
  `);
312860
+ const MAX_SYMBOLS_PER_FILE = 1e4;
312801
312861
  const tx = this.db.transaction(() => {
312862
+ let symbolCount2 = 0;
312802
312863
  for (const sym of outline.symbols) {
312864
+ if (symbolCount2 >= MAX_SYMBOLS_PER_FILE)
312865
+ break;
312803
312866
  const key = `${sym.name}:${String(sym.location.line)}`;
312804
312867
  if (seen.has(key))
312805
312868
  continue;
@@ -312814,6 +312877,7 @@ class RepoMap {
312814
312877
  }
312815
312878
  const sig = extractSignature(lines, sym.location.line - 1, sym.kind);
312816
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++;
312817
312881
  }
312818
312882
  });
312819
312883
  tx();
@@ -312822,25 +312886,18 @@ class RepoMap {
312822
312886
  const fileSyms = this.db.query("SELECT id, name, kind, line, end_line FROM symbols WHERE file_id = ? ORDER BY line ASC").all(fileId);
312823
312887
  const containers = fileSyms.filter((s) => CONTAINER_KINDS.has(s.kind) && s.end_line > s.line);
312824
312888
  if (containers.length > 0) {
312889
+ const sorted = [...containers].sort((a, b) => a.end_line - a.line - (b.end_line - b.line));
312825
312890
  const updateQname = this.db.prepare("UPDATE symbols SET qualified_name = ? WHERE id = ?");
312826
312891
  const qTx = this.db.transaction(() => {
312827
312892
  for (const sym of fileSyms) {
312828
- let enclosing;
312829
- let bestSpan = Infinity;
312830
- for (const c of containers) {
312893
+ for (const c of sorted) {
312831
312894
  if (c.id === sym.id)
312832
312895
  continue;
312833
312896
  if (c.line <= sym.line && c.end_line >= sym.end_line) {
312834
- const span = c.end_line - c.line;
312835
- if (span < bestSpan) {
312836
- bestSpan = span;
312837
- enclosing = c;
312838
- }
312897
+ updateQname.run(`${c.name}.${sym.name}`, sym.id);
312898
+ break;
312839
312899
  }
312840
312900
  }
312841
- if (enclosing) {
312842
- updateQname.run(`${enclosing.name}.${sym.name}`, sym.id);
312843
- }
312844
312901
  }
312845
312902
  });
312846
312903
  qTx();
@@ -313101,7 +313158,7 @@ class RepoMap {
313101
313158
  }
313102
313159
  }
313103
313160
  if (normalized) {
313104
- const base = resolve9(importerDir, normalized);
313161
+ const base = resolve10(importerDir, normalized);
313105
313162
  const relBase = relative2(this.cwd, base);
313106
313163
  if (relBase.startsWith(".."))
313107
313164
  return null;
@@ -313229,7 +313286,10 @@ class RepoMap {
313229
313286
  const insertRef = this.db.prepare("INSERT INTO refs (file_id, name, source_file_id, import_source) VALUES (?, ?, ?, ?)");
313230
313287
  const insertSymbol = this.db.prepare("INSERT INTO symbols (file_id, name, kind, line, end_line, is_exported, signature) VALUES (?, ?, ?, 1, 1, 1, NULL)");
313231
313288
  const expanded = new Set;
313289
+ const starStart = Date.now();
313232
313290
  for (let pass = 0;pass < 10; pass++) {
313291
+ if (Date.now() - starStart > 1e4)
313292
+ break;
313233
313293
  const starRefs = this.db.query("SELECT file_id, source_file_id FROM refs WHERE name = '*' AND source_file_id IS NOT NULL").all();
313234
313294
  let changed = false;
313235
313295
  const tx = this.db.transaction(() => {
@@ -313731,12 +313791,12 @@ class RepoMap {
313731
313791
  const {
313732
313792
  execFile
313733
313793
  } = await import("child_process");
313734
- logOutput = await new Promise((resolve10, reject) => {
313794
+ logOutput = await new Promise((resolve11, reject) => {
313735
313795
  execFile("git", ["log", "--pretty=format:---COMMIT---", "--name-only", "-n", String(GIT_LOG_COMMITS)], {
313736
313796
  cwd: this.cwd,
313737
313797
  timeout: 1e4,
313738
313798
  maxBuffer: 5000000
313739
- }, (err2, stdout) => err2 ? reject(err2) : resolve10(stdout));
313799
+ }, (err2, stdout) => err2 ? reject(err2) : resolve11(stdout));
313740
313800
  });
313741
313801
  } catch {
313742
313802
  return;
@@ -314204,6 +314264,7 @@ class RepoMap {
314204
314264
  }
314205
314265
  async buildCallGraph() {
314206
314266
  const tick = () => new Promise((r) => setTimeout(r, 1));
314267
+ const regexCache2 = new Map;
314207
314268
  this.db.run("DELETE FROM calls");
314208
314269
  const filesWithImports = this.db.query(`SELECT DISTINCT f.id, f.path FROM files f
314209
314270
  WHERE EXISTS (SELECT 1 FROM symbols s WHERE s.file_id = f.id AND s.kind IN ('function', 'method'))
@@ -314243,11 +314304,19 @@ class RepoMap {
314243
314304
  const functions = getFunctions.all(file2.id);
314244
314305
  if (functions.length === 0)
314245
314306
  continue;
314246
- const importPatterns = imports.map((imp) => ({
314247
- name: imp.name,
314248
- sourceFileId: imp.source_file_id,
314249
- re: new RegExp(`\\b${imp.name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`)
314250
- }));
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
+ });
314251
314320
  for (const func2 of functions) {
314252
314321
  const bodyStart = func2.line;
314253
314322
  const bodyEnd = Math.min(func2.end_line, lines.length);
@@ -315414,13 +315483,9 @@ class RepoMap {
315414
315483
  this.db.run("INSERT INTO symbols_fts(rowid, name, kind) SELECT id, name, kind FROM symbols");
315415
315484
  }
315416
315485
  compactIfNeeded() {
315417
- const bytes = this.dbSizeBytes();
315418
- if (bytes > 52428800) {
315419
- try {
315420
- this.db.run("PRAGMA wal_checkpoint(TRUNCATE)");
315421
- this.db.run("VACUUM");
315422
- } catch {}
315423
- }
315486
+ try {
315487
+ this.db.run("PRAGMA wal_checkpoint(TRUNCATE)");
315488
+ } catch {}
315424
315489
  }
315425
315490
  dbSizeBytes() {
315426
315491
  try {
@@ -315486,7 +315551,7 @@ var init_intelligence = __esm(() => {
315486
315551
  // src/core/tools/analyze.ts
315487
315552
  import { spawn as spawn3 } from "child_process";
315488
315553
  import { readFile as readFile7 } from "fs/promises";
315489
- import { resolve as resolve10 } from "path";
315554
+ import { resolve as resolve11 } from "path";
315490
315555
  async function fallbackTracked(file2, operation, fn) {
315491
315556
  const router2 = getIntelligenceRouter(process.cwd());
315492
315557
  const language = router2.detectLanguage(file2);
@@ -315513,7 +315578,7 @@ var init_analyze = __esm(() => {
315513
315578
  execute: async (args2) => {
315514
315579
  try {
315515
315580
  const client = getIntelligenceClient();
315516
- const file2 = args2.file ? resolve10(args2.file) : undefined;
315581
+ const file2 = args2.file ? resolve11(args2.file) : undefined;
315517
315582
  if (file2) {
315518
315583
  const blocked = isForbidden(file2);
315519
315584
  if (blocked) {
@@ -315744,7 +315809,7 @@ ${unusedLines.join(`
315744
315809
  }
315745
315810
  let newContent;
315746
315811
  try {
315747
- newContent = await readFile7(resolve10(file2), "utf-8");
315812
+ newContent = await readFile7(resolve11(file2), "utf-8");
315748
315813
  } catch {
315749
315814
  return {
315750
315815
  success: false,
@@ -315878,10 +315943,10 @@ var init_constants2 = __esm(() => {
315878
315943
 
315879
315944
  // src/core/tools/discover-pattern.ts
315880
315945
  import { readFile as readFile8 } from "fs/promises";
315881
- import { resolve as resolve11 } from "path";
315946
+ import { resolve as resolve12 } from "path";
315882
315947
  async function lineCount(file2) {
315883
315948
  try {
315884
- return (await readFile8(resolve11(file2), "utf-8")).split(`
315949
+ return (await readFile8(resolve12(file2), "utf-8")).split(`
315885
315950
  `).length;
315886
315951
  } catch {
315887
315952
  return null;
@@ -315898,7 +315963,7 @@ var init_discover_pattern = __esm(() => {
315898
315963
  try {
315899
315964
  const client = getIntelligenceClient();
315900
315965
  const router2 = getIntelligenceRouter(process.cwd());
315901
- const file2 = args2.file ? resolve11(args2.file) : undefined;
315966
+ const file2 = args2.file ? resolve12(args2.file) : undefined;
315902
315967
  const language = router2.detectLanguage(file2);
315903
315968
  let symbols;
315904
315969
  if (client) {
@@ -316176,7 +316241,7 @@ __export(exports_tee, {
316176
316241
  saveTee: () => saveTee
316177
316242
  });
316178
316243
  import { mkdir, readdir as readdir3, unlink, writeFile } from "fs/promises";
316179
- import { homedir as homedir12 } from "os";
316244
+ import { homedir as homedir13 } from "os";
316180
316245
  import { join as join17 } from "path";
316181
316246
  async function ensureDir() {
316182
316247
  if (dirReady)
@@ -316239,7 +316304,7 @@ async function truncateWithTee(output, limit, headSize, tailSize, label) {
316239
316304
  }
316240
316305
  var TEE_DIR, MAX_TEE_FILES = 20, MAX_TEE_BYTES = 512000, dirReady = false;
316241
316306
  var init_tee = __esm(() => {
316242
- TEE_DIR = join17(homedir12(), ".local", "share", "soulforge", "tee");
316307
+ TEE_DIR = join17(homedir13(), ".local", "share", "soulforge", "tee");
316243
316308
  });
316244
316309
 
316245
316310
  // src/core/tools/project.ts
@@ -317235,7 +317300,7 @@ var init_file_events = __esm(() => {
317235
317300
 
317236
317301
  // src/core/tools/edit-stack.ts
317237
317302
  import { stat as statAsync2, writeFile as writeFile2 } from "fs/promises";
317238
- import { resolve as resolve12 } from "path";
317303
+ import { resolve as resolve13 } from "path";
317239
317304
  function contentHash(s) {
317240
317305
  return Number(Bun.hash(s));
317241
317306
  }
@@ -317349,7 +317414,7 @@ var init_edit_stack = __esm(() => {
317349
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.",
317350
317415
  execute: async (args2) => {
317351
317416
  try {
317352
- const filePath = resolve12(args2.path);
317417
+ const filePath = resolve13(args2.path);
317353
317418
  const blocked = isForbidden(filePath);
317354
317419
  if (blocked) {
317355
317420
  const msg = `Access denied: "${args2.path}" matches forbidden pattern "${blocked}".`;
@@ -317532,7 +317597,7 @@ var init_post_edit = __esm(() => {
317532
317597
 
317533
317598
  // src/core/tools/edit-file.ts
317534
317599
  import { mkdir as mkdir2, readFile as readFile10, stat as statAsync3, writeFile as writeFile3 } from "fs/promises";
317535
- import { dirname as dirname6, resolve as resolve13 } from "path";
317600
+ import { dirname as dirname6, resolve as resolve14 } from "path";
317536
317601
  function formatMetricDelta(label, before, after) {
317537
317602
  const delta = after - before;
317538
317603
  if (delta === 0)
@@ -317715,7 +317780,7 @@ var init_edit_file = __esm(() => {
317715
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.",
317716
317781
  execute: async (args2) => {
317717
317782
  try {
317718
- const filePath = resolve13(args2.path);
317783
+ const filePath = resolve14(args2.path);
317719
317784
  const blocked = isForbidden(filePath);
317720
317785
  if (blocked) {
317721
317786
  const msg = `Access denied: "${args2.path}" matches forbidden pattern "${blocked}". This file is blocked for security.`;
@@ -317889,7 +317954,7 @@ function toolDenied(msg) {
317889
317954
  }
317890
317955
 
317891
317956
  // src/core/tools/editor.ts
317892
- import { resolve as resolve14 } from "path";
317957
+ import { resolve as resolve15 } from "path";
317893
317958
  async function checkCurrentBufferForbidden(nvim) {
317894
317959
  if (!nvim)
317895
317960
  return null;
@@ -317976,9 +318041,9 @@ async function withNvimRaw(fn, file2) {
317976
318041
  async function switchToFile(nvim, file2) {
317977
318042
  if (!file2)
317978
318043
  return;
317979
- const targetPath = resolve14(file2);
318044
+ const targetPath = resolve15(file2);
317980
318045
  const currentBuf = await nvim.api.request("nvim_buf_get_name", [0]);
317981
- if (typeof currentBuf === "string" && resolve14(currentBuf) !== targetPath) {
318046
+ if (typeof currentBuf === "string" && resolve15(currentBuf) !== targetPath) {
317982
318047
  await nvim.api.executeLua("vim.cmd.edit(vim.fn.fnameescape(...))", [targetPath]);
317983
318048
  }
317984
318049
  }
@@ -318124,7 +318189,7 @@ var init_editor = __esm(() => {
318124
318189
  strictIndexing: false
318125
318190
  }), nvim.api.request("nvim_buf_get_name", [0])]);
318126
318191
  if (typeof bufName === "string" && bufName) {
318127
- emitFileRead(resolve14(bufName));
318192
+ emitFileRead(resolve15(bufName));
318128
318193
  }
318129
318194
  const lineOffset = args2.startLine ?? 1;
318130
318195
  const numbered = lines.map((l, i2) => `${String(i2 + lineOffset).padStart(4)} ${l}`);
@@ -318158,7 +318223,7 @@ var init_editor = __esm(() => {
318158
318223
  strictIndexing: false
318159
318224
  })]);
318160
318225
  if (typeof bufName === "string" && bufName) {
318161
- emitFileEdited(resolve14(bufName), allLines.join(`
318226
+ emitFileEdited(resolve15(bufName), allLines.join(`
318162
318227
  `));
318163
318228
  }
318164
318229
  const count = replacementLines.length;
@@ -323461,8 +323526,8 @@ class CustomElementRegistry {
323461
323526
  } : (element) => element.localName === localName;
323462
323527
  registry2.set(localName, { Class: Class2, check: check2 });
323463
323528
  if (waiting.has(localName)) {
323464
- for (const resolve15 of waiting.get(localName))
323465
- resolve15(Class2);
323529
+ for (const resolve16 of waiting.get(localName))
323530
+ resolve16(Class2);
323466
323531
  waiting.delete(localName);
323467
323532
  }
323468
323533
  ownerDocument.querySelectorAll(extend2 ? `${extend2}[is="${localName}"]` : localName).forEach(this.upgrade, this);
@@ -323494,13 +323559,13 @@ class CustomElementRegistry {
323494
323559
  }
323495
323560
  whenDefined(localName) {
323496
323561
  const { registry: registry2, waiting } = this;
323497
- return new Promise((resolve15) => {
323562
+ return new Promise((resolve16) => {
323498
323563
  if (registry2.has(localName))
323499
- resolve15(registry2.get(localName).Class);
323564
+ resolve16(registry2.get(localName).Class);
323500
323565
  else {
323501
323566
  if (!waiting.has(localName))
323502
323567
  waiting.set(localName, []);
323503
- waiting.get(localName).push(resolve15);
323568
+ waiting.get(localName).push(resolve16);
323504
323569
  }
323505
323570
  });
323506
323571
  }
@@ -331782,7 +331847,7 @@ class WorkerClient {
331782
331847
  args: args2
331783
331848
  });
331784
331849
  this.onRpcStart?.();
331785
- return new Promise((resolve15, reject) => {
331850
+ return new Promise((resolve16, reject) => {
331786
331851
  const timer = setTimeout(() => {
331787
331852
  if (this.pending.delete(id)) {
331788
331853
  this.onRpcEnd?.(true);
@@ -331793,7 +331858,7 @@ class WorkerClient {
331793
331858
  resolve: (v) => {
331794
331859
  clearTimeout(timer);
331795
331860
  this.onRpcEnd?.();
331796
- resolve15(v);
331861
+ resolve16(v);
331797
331862
  },
331798
331863
  reject: (e) => {
331799
331864
  clearTimeout(timer);
@@ -331935,7 +332000,7 @@ __export(exports_io_client, {
331935
332000
  disposeIOClient: () => disposeIOClient,
331936
332001
  IOClient: () => IOClient
331937
332002
  });
331938
- import { homedir as homedir13 } from "os";
332003
+ import { homedir as homedir14 } from "os";
331939
332004
  import { join as join19 } from "path";
331940
332005
  function getIOClient() {
331941
332006
  if (!_instance2)
@@ -331953,7 +332018,7 @@ var init_io_client = __esm(() => {
331953
332018
  IS_DIST = !IS_COMPILED && import.meta.dir.includes("/dist");
331954
332019
  IOClient = class IOClient extends WorkerClient {
331955
332020
  constructor() {
331956
- 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");
331957
332022
  super(workerPath, undefined, {
331958
332023
  smol: true
331959
332024
  });
@@ -332017,7 +332082,7 @@ var init_io_client = __esm(() => {
332017
332082
  // src/core/git/status.ts
332018
332083
  import { spawn as spawn4 } from "child_process";
332019
332084
  function run2(args2, cwd, timeout = 5000) {
332020
- return new Promise((resolve15) => {
332085
+ return new Promise((resolve16) => {
332021
332086
  const chunks = [];
332022
332087
  const proc = spawn4("git", args2, {
332023
332088
  cwd,
@@ -332027,11 +332092,11 @@ function run2(args2, cwd, timeout = 5000) {
332027
332092
  }
332028
332093
  });
332029
332094
  proc.stdout.on("data", (d) => chunks.push(d.toString()));
332030
- proc.on("close", (code) => resolve15({
332095
+ proc.on("close", (code) => resolve16({
332031
332096
  ok: code === 0,
332032
332097
  stdout: chunks.join("")
332033
332098
  }));
332034
- proc.on("error", () => resolve15({
332099
+ proc.on("error", () => resolve16({
332035
332100
  ok: false,
332036
332101
  stdout: ""
332037
332102
  }));
@@ -333101,12 +333166,12 @@ function getFdBin() {
333101
333166
  return _fdBinPromise;
333102
333167
  _fdBinPromise = (async () => {
333103
333168
  for (const bin of ["fd", "fdfind"]) {
333104
- const found = await new Promise((resolve15) => {
333169
+ const found = await new Promise((resolve16) => {
333105
333170
  const proc = spawn5("sh", ["-c", `command -v ${bin}`], {
333106
333171
  stdio: "ignore"
333107
333172
  });
333108
- proc.on("error", () => resolve15(false));
333109
- proc.on("close", (code) => resolve15(code === 0));
333173
+ proc.on("error", () => resolve16(false));
333174
+ proc.on("close", (code) => resolve16(code === 0));
333110
333175
  });
333111
333176
  if (found) {
333112
333177
  _fdBin = bin;
@@ -333119,40 +333184,40 @@ function getFdBin() {
333119
333184
  return _fdBinPromise;
333120
333185
  }
333121
333186
  function runFd(bin, pattern, basePath) {
333122
- return new Promise((resolve15) => {
333187
+ return new Promise((resolve16) => {
333123
333188
  const proc = spawn5(bin, ["--glob", pattern, basePath, "--max-results", "50", "--max-depth", "8"], {
333124
333189
  cwd: process.cwd(),
333125
333190
  timeout: 1e4
333126
333191
  });
333127
333192
  const chunks = [];
333128
333193
  proc.stdout.on("data", (data) => chunks.push(data.toString()));
333129
- proc.on("error", () => resolve15(null));
333194
+ proc.on("error", () => resolve16(null));
333130
333195
  proc.on("close", (code) => {
333131
333196
  if (code === 0) {
333132
- resolve15({
333197
+ resolve16({
333133
333198
  success: true,
333134
333199
  output: chunks.join("") || "No files found."
333135
333200
  });
333136
333201
  } else {
333137
- resolve15(null);
333202
+ resolve16(null);
333138
333203
  }
333139
333204
  });
333140
333205
  });
333141
333206
  }
333142
333207
  function runFind(pattern, basePath) {
333143
- return new Promise((resolve15) => {
333208
+ return new Promise((resolve16) => {
333144
333209
  const proc = spawn5("find", [basePath, "-name", pattern, "-maxdepth", "5"], {
333145
333210
  cwd: process.cwd(),
333146
333211
  timeout: 1e4
333147
333212
  });
333148
333213
  const chunks = [];
333149
333214
  proc.stdout.on("data", (data) => chunks.push(data.toString()));
333150
- proc.on("error", () => resolve15({
333215
+ proc.on("error", () => resolve16({
333151
333216
  success: true,
333152
333217
  output: "No files found."
333153
333218
  }));
333154
333219
  proc.on("close", () => {
333155
- resolve15({
333220
+ resolve16({
333156
333221
  success: true,
333157
333222
  output: chunks.join("") || "No files found."
333158
333223
  });
@@ -333192,7 +333257,7 @@ var init_glob = __esm(() => {
333192
333257
 
333193
333258
  // src/core/tools/grep.ts
333194
333259
  import { spawn as spawn6 } from "child_process";
333195
- import { resolve as resolve15 } from "path";
333260
+ import { resolve as resolve16 } from "path";
333196
333261
  async function enrichWithSymbolContext(output) {
333197
333262
  if (output === "No matches found.")
333198
333263
  return output;
@@ -333214,7 +333279,7 @@ async function enrichWithSymbolContext(output) {
333214
333279
  const outlines = new Map;
333215
333280
  await Promise.all([...hitsByFile.keys()].map(async (file2) => {
333216
333281
  try {
333217
- const abs = resolve15(file2);
333282
+ const abs = resolve16(file2);
333218
333283
  let ol = null;
333219
333284
  if (client) {
333220
333285
  const tracked = await client.routerGetFileOutline(abs);
@@ -333376,7 +333441,7 @@ var init_grep = __esm(() => {
333376
333441
 
333377
333442
  // src/core/tools/list-dir.ts
333378
333443
  import { readdir as readdir5, stat as stat3 } from "fs/promises";
333379
- 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";
333380
333445
  function formatEntry(name21, isDir, meta3) {
333381
333446
  if (isDir)
333382
333447
  return `\uD83D\uDCC1 ${name21}/`;
@@ -333494,7 +333559,7 @@ var init_list_dir = __esm(() => {
333494
333559
  const seen = new Set;
333495
333560
  const targetPaths = [];
333496
333561
  for (const raw of rawPaths) {
333497
- const abs = resolve16(raw);
333562
+ const abs = resolve17(raw);
333498
333563
  if (seen.has(abs))
333499
333564
  continue;
333500
333565
  seen.add(abs);
@@ -333714,9 +333779,9 @@ __export(exports_post_edit_fix, {
333714
333779
  autoFixFiles: () => autoFixFiles
333715
333780
  });
333716
333781
  import { readFile as readFile11, writeFile as writeFile4 } from "fs/promises";
333717
- import { resolve as resolve17 } from "path";
333782
+ import { resolve as resolve18 } from "path";
333718
333783
  async function autoFixFile(filePath, tabId) {
333719
- const absPath = resolve17(filePath);
333784
+ const absPath = resolve18(filePath);
333720
333785
  const client = getIntelligenceClient();
333721
333786
  const router2 = getIntelligenceRouter(process.cwd());
333722
333787
  const language = client ? await client.routerDetectLanguage(absPath) : router2.detectLanguage(absPath);
@@ -333775,7 +333840,7 @@ async function autoFixFile(filePath, tabId) {
333775
333840
  }
333776
333841
  async function autoFixFiles(filePaths, tabId) {
333777
333842
  const results = new Map;
333778
- const unique = [...new Set(filePaths.map((f) => resolve17(f)))];
333843
+ const unique = [...new Set(filePaths.map((f) => resolve18(f)))];
333779
333844
  await Promise.all(unique.map(async (file2) => {
333780
333845
  try {
333781
333846
  const actions = await autoFixFile(file2, tabId);
@@ -333831,7 +333896,7 @@ var init_post_edit_fix = __esm(() => {
333831
333896
 
333832
333897
  // src/core/tools/move-symbol.ts
333833
333898
  import { access as access2, mkdir as mkdir3, readFile as readFile12, unlink as unlink2, writeFile as writeFile5 } from "fs/promises";
333834
- 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";
333835
333900
 
333836
333901
  class WriteTransaction {
333837
333902
  writes = [];
@@ -333963,11 +334028,11 @@ function findCommentStart(lines, defStart) {
333963
334028
  return start2;
333964
334029
  }
333965
334030
  async function findProjectRoot(file2) {
333966
- let dir = dirname7(resolve18(file2));
334031
+ let dir = dirname7(resolve19(file2));
333967
334032
  for (let depth = 0;depth < 20; depth++) {
333968
334033
  for (const m of ["tsconfig.json", "package.json", "Cargo.toml", "go.mod", "pyproject.toml", "Makefile"]) {
333969
334034
  try {
333970
- await access2(resolve18(dir, m));
334035
+ await access2(resolve19(dir, m));
333971
334036
  return dir;
333972
334037
  } catch {}
333973
334038
  }
@@ -333987,7 +334052,7 @@ async function grepSymbol(symbol26, root) {
333987
334052
  });
333988
334053
  const text2 = await new Response(proc.stdout).text();
333989
334054
  return text2.trim().split(`
333990
- `).filter(Boolean).map((f) => resolve18(f));
334055
+ `).filter(Boolean).map((f) => resolve19(f));
333991
334056
  } catch {
333992
334057
  return [];
333993
334058
  }
@@ -334120,7 +334185,7 @@ ${lines[j] ?? ""}`;
334120
334185
  const dir = dirname7(contextFile);
334121
334186
  const base = source.replace(/\.(js|ts|jsx|tsx|mjs|cjs)$/, "");
334122
334187
  for (const ext of [".ts", ".tsx", ".js", ".jsx"]) {
334123
- const p = resolve18(dir, base + ext);
334188
+ const p = resolve19(dir, base + ext);
334124
334189
  try {
334125
334190
  await access2(p);
334126
334191
  return p;
@@ -334178,19 +334243,19 @@ ${lines[j] ?? ""}`;
334178
334243
  for (let i2 = 0;i2 < levels; i2++)
334179
334244
  dir = dirname7(dir);
334180
334245
  const parts3 = source.slice(dotStr.length).split(".");
334181
- const modPath2 = resolve18(dir, ...parts3);
334246
+ const modPath2 = resolve19(dir, ...parts3);
334182
334247
  if (await fileExists(`${modPath2}.py`))
334183
334248
  return `${modPath2}.py`;
334184
- if (await fileExists(resolve18(modPath2, "__init__.py")))
334185
- return resolve18(modPath2, "__init__.py");
334249
+ if (await fileExists(resolve19(modPath2, "__init__.py")))
334250
+ return resolve19(modPath2, "__init__.py");
334186
334251
  return null;
334187
334252
  }
334188
334253
  const parts2 = source.split(".");
334189
- const modPath = resolve18(dirname7(contextFile), ...parts2);
334254
+ const modPath = resolve19(dirname7(contextFile), ...parts2);
334190
334255
  if (await fileExists(`${modPath}.py`))
334191
334256
  return `${modPath}.py`;
334192
- if (await fileExists(resolve18(modPath, "__init__.py")))
334193
- return resolve18(modPath, "__init__.py");
334257
+ if (await fileExists(resolve19(modPath, "__init__.py")))
334258
+ return resolve19(modPath, "__init__.py");
334194
334259
  return null;
334195
334260
  },
334196
334261
  computePath(fromFile, toFile) {
@@ -334334,7 +334399,7 @@ ${lines[j] ?? ""}`;
334334
334399
  return result;
334335
334400
  },
334336
334401
  async resolveSource(source, contextFile) {
334337
- const p = resolve18(dirname7(contextFile), source);
334402
+ const p = resolve19(dirname7(contextFile), source);
334338
334403
  try {
334339
334404
  await access2(p);
334340
334405
  return p;
@@ -334354,8 +334419,8 @@ ${lines[j] ?? ""}`;
334354
334419
  description: "[TIER-3] Move a symbol between files with automatic import updates across the codebase.",
334355
334420
  execute: async (args2) => {
334356
334421
  try {
334357
- const from = resolve18(args2.from);
334358
- const to = resolve18(args2.to);
334422
+ const from = resolve19(args2.from);
334423
+ const to = resolve19(args2.to);
334359
334424
  try {
334360
334425
  await access2(from);
334361
334426
  } catch {
@@ -334626,7 +334691,7 @@ ${fixed}`);
334626
334691
 
334627
334692
  // src/core/tools/multi-edit.ts
334628
334693
  import { readFile as readFile13, stat as statAsync4, writeFile as writeFile6 } from "fs/promises";
334629
- import { resolve as resolve19 } from "path";
334694
+ import { resolve as resolve20 } from "path";
334630
334695
  var multiEditTool;
334631
334696
  var init_multi_edit = __esm(() => {
334632
334697
  init_instance();
@@ -334639,7 +334704,7 @@ var init_multi_edit = __esm(() => {
334639
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.",
334640
334705
  execute: async (args2) => {
334641
334706
  try {
334642
- const filePath = resolve19(args2.path);
334707
+ const filePath = resolve20(args2.path);
334643
334708
  const blocked = isForbidden(filePath);
334644
334709
  if (blocked) {
334645
334710
  const msg = `Access denied: "${args2.path}" matches forbidden pattern "${blocked}".`;
@@ -334859,7 +334924,7 @@ ${diffOutput}`;
334859
334924
 
334860
334925
  // src/core/tools/navigate.ts
334861
334926
  import { stat as statAsync5 } from "fs/promises";
334862
- import { resolve as resolve20 } from "path";
334927
+ import { resolve as resolve21 } from "path";
334863
334928
  function formatLocation(loc) {
334864
334929
  const end = loc.endLine ? `-${String(loc.endLine)}` : "";
334865
334930
  return `${loc.file}:${String(loc.line)}${end}`;
@@ -334911,7 +334976,7 @@ async function autoResolveFile(client, symbol26, repoMap) {
334911
334976
  const matches2 = exact.length > 0 ? exact : results.slice(0, 1);
334912
334977
  const validFiles = [];
334913
334978
  for (const m of matches2) {
334914
- const f = resolve20(m.location.file);
334979
+ const f = resolve21(m.location.file);
334915
334980
  try {
334916
334981
  const st = await statAsync5(f);
334917
334982
  if (st.isFile())
@@ -334937,7 +335002,7 @@ async function autoResolveFile(client, symbol26, repoMap) {
334937
335002
  });
334938
335003
  const text2 = await new Response(proc.stdout).text();
334939
335004
  const grepMatches = text2.trim().split(`
334940
- `).filter(Boolean).map((p) => resolve20(p));
335005
+ `).filter(Boolean).map((p) => resolve21(p));
334941
335006
  if (grepMatches.length === 1)
334942
335007
  return {
334943
335008
  resolved: grepMatches[0]
@@ -334976,7 +335041,7 @@ var init_navigate = __esm(() => {
334976
335041
  execute: async (args2, repoMap) => {
334977
335042
  try {
334978
335043
  const client = getIntelligenceClient();
334979
- let file2 = args2.file ? resolve20(args2.file) : undefined;
335044
+ let file2 = args2.file ? resolve21(args2.file) : undefined;
334980
335045
  const symbol26 = args2.symbol;
334981
335046
  if (file2) {
334982
335047
  const blocked = isForbidden(file2);
@@ -335608,7 +335673,7 @@ var init_lib2 = () => {};
335608
335673
 
335609
335674
  // src/core/tools/binary-detect.ts
335610
335675
  import { existsSync as existsSync16, statSync as statSync3 } from "fs";
335611
- import { extname as extname4, resolve as resolve21 } from "path";
335676
+ import { extname as extname4, resolve as resolve22 } from "path";
335612
335677
  function binaryHint(ext) {
335613
335678
  if (IMAGE_EXTS.has(ext))
335614
335679
  return " This is an image file. Describe what you need from it or ask the user to describe its contents.";
@@ -335653,7 +335718,7 @@ function checkShellBinaryRead(command, cwd2) {
335653
335718
  const arg = tokens[i2];
335654
335719
  if (!arg || arg.startsWith("-"))
335655
335720
  continue;
335656
- const abs = resolve21(cwd2, arg);
335721
+ const abs = resolve22(cwd2, arg);
335657
335722
  const err2 = checkBinaryFile(abs);
335658
335723
  if (err2)
335659
335724
  return err2;
@@ -335674,7 +335739,7 @@ var init_binary_detect = __esm(() => {
335674
335739
 
335675
335740
  // src/core/tools/read-file.ts
335676
335741
  import { access as access3, stat as statAsync6 } from "fs/promises";
335677
- import { extname as extname5, resolve as resolve22 } from "path";
335742
+ import { extname as extname5, resolve as resolve23 } from "path";
335678
335743
  async function readViaWorker(filePath, args2) {
335679
335744
  let result;
335680
335745
  try {
@@ -335911,7 +335976,7 @@ var init_read_file = __esm(() => {
335911
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.",
335912
335977
  execute: async (args2) => {
335913
335978
  try {
335914
- const filePath = resolve22(args2.path);
335979
+ const filePath = resolve23(args2.path);
335915
335980
  if (args2.target) {
335916
335981
  return readSymbolFromFile(filePath, args2);
335917
335982
  }
@@ -335939,7 +336004,7 @@ var init_read_file = __esm(() => {
335939
336004
 
335940
336005
  // src/core/tools/refactor.ts
335941
336006
  import { readFile as readFile14, writeFile as writeFile7 } from "fs/promises";
335942
- import { resolve as resolve23 } from "path";
336007
+ import { resolve as resolve24 } from "path";
335943
336008
  async function fallbackTracked3(file2, operation, fn) {
335944
336009
  const router2 = getIntelligenceRouter(process.cwd());
335945
336010
  const language = router2.detectLanguage(file2);
@@ -336055,7 +336120,7 @@ var init_refactor = __esm(() => {
336055
336120
  execute: async (args2) => {
336056
336121
  try {
336057
336122
  const router2 = getIntelligenceRouter(process.cwd());
336058
- const file2 = args2.file ? resolve23(args2.file) : undefined;
336123
+ const file2 = args2.file ? resolve24(args2.file) : undefined;
336059
336124
  if (file2) {
336060
336125
  const blocked = isForbidden(file2);
336061
336126
  if (blocked) {
@@ -336317,7 +336382,7 @@ ${diagOutput}`;
336317
336382
 
336318
336383
  // src/core/tools/rename-file.ts
336319
336384
  import { mkdir as mkdir4, readFile as readFile15, rename as rename2, stat as statAsync7, writeFile as writeFile8 } from "fs/promises";
336320
- 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";
336321
336386
  var renameFileTool;
336322
336387
  var init_rename_file = __esm(() => {
336323
336388
  init_intelligence();
@@ -336328,8 +336393,8 @@ var init_rename_file = __esm(() => {
336328
336393
  name: "rename_file",
336329
336394
  description: "Rename or move a file. LSP automatically updates all imports/references across the project. Use for refactoring file structure.",
336330
336395
  execute: async (args2) => {
336331
- const from = resolve24(args2.from);
336332
- const to = resolve24(args2.to);
336396
+ const from = resolve25(args2.from);
336397
+ const to = resolve25(args2.to);
336333
336398
  const cwd2 = process.cwd();
336334
336399
  try {
336335
336400
  await statAsync7(from);
@@ -336478,7 +336543,7 @@ ${fixed}`);
336478
336543
 
336479
336544
  // src/core/tools/rename-symbol.ts
336480
336545
  import { readFile as readFile16, stat as statAsync8, writeFile as writeFile9 } from "fs/promises";
336481
- import { extname as extname6, resolve as resolve25 } from "path";
336546
+ import { extname as extname6, resolve as resolve26 } from "path";
336482
336547
  async function applyEdits2(edits, tabId) {
336483
336548
  for (const edit of edits) {
336484
336549
  const blocked = isForbidden(edit.file);
@@ -336685,7 +336750,7 @@ function replaceInCode(source, escapedSymbol, newName, filePath) {
336685
336750
  async function locateSymbol(router2, symbol26, hint) {
336686
336751
  if (hint) {
336687
336752
  return {
336688
- file: resolve25(hint)
336753
+ file: resolve26(hint)
336689
336754
  };
336690
336755
  }
336691
336756
  const client = getIntelligenceClient();
@@ -336701,7 +336766,7 @@ async function locateSymbol(router2, symbol26, hint) {
336701
336766
  const exact = results.find((s) => s.name === symbol26);
336702
336767
  const match = exact ?? results[0];
336703
336768
  if (match) {
336704
- const resolved = resolve25(match.location.file);
336769
+ const resolved = resolve26(match.location.file);
336705
336770
  try {
336706
336771
  const st = await statAsync8(resolved);
336707
336772
  if (st.isFile())
@@ -336725,7 +336790,7 @@ async function locateSymbol(router2, symbol26, hint) {
336725
336790
  const best = matches2.sort((a, b) => b.split("/").length - a.split("/").length)[0];
336726
336791
  if (best)
336727
336792
  return {
336728
- file: resolve25(best)
336793
+ file: resolve26(best)
336729
336794
  };
336730
336795
  }
336731
336796
  } catch {}
@@ -336763,7 +336828,7 @@ async function findRemainingReferences(symbol26, definitionFile) {
336763
336828
  });
336764
336829
  const text2 = await new Response(proc.stdout).text();
336765
336830
  return text2.trim().split(`
336766
- `).filter(Boolean).map((f) => resolve25(f));
336831
+ `).filter(Boolean).map((f) => resolve26(f));
336767
336832
  } catch {
336768
336833
  return [];
336769
336834
  }
@@ -337139,7 +337204,7 @@ async function runPreCommitChecks(cwd2) {
337139
337204
  exitCode,
337140
337205
  stdout,
337141
337206
  stderr
337142
- } = await new Promise((resolve26) => {
337207
+ } = await new Promise((resolve27) => {
337143
337208
  const chunks = [];
337144
337209
  const errChunks = [];
337145
337210
  let lintBytes = 0;
@@ -337158,12 +337223,12 @@ async function runPreCommitChecks(cwd2) {
337158
337223
  if (lintBytes <= MAX_COLLECT_BYTES)
337159
337224
  errChunks.push(d.toString());
337160
337225
  });
337161
- proc.on("close", (code) => resolve26({
337226
+ proc.on("close", (code) => resolve27({
337162
337227
  exitCode: code,
337163
337228
  stdout: chunks.join(""),
337164
337229
  stderr: errChunks.join("")
337165
337230
  }));
337166
- proc.on("error", () => resolve26({
337231
+ proc.on("error", () => resolve27({
337167
337232
  exitCode: 1,
337168
337233
  stdout: "",
337169
337234
  stderr: "lint process error"
@@ -337380,7 +337445,7 @@ var init_shell = __esm(() => {
337380
337445
  };
337381
337446
  }
337382
337447
  const timeout = args2.timeout ?? DEFAULT_TIMEOUT;
337383
- return new Promise((resolve26) => {
337448
+ return new Promise((resolve27) => {
337384
337449
  const chunks = [];
337385
337450
  const errChunks = [];
337386
337451
  let stdoutBytes = 0;
@@ -337452,18 +337517,18 @@ var init_shell = __esm(() => {
337452
337517
  const output = hint ? `${stdout || stderr}
337453
337518
 
337454
337519
  ${hint}` : stdout || stderr;
337455
- resolve26({
337520
+ resolve27({
337456
337521
  success: true,
337457
337522
  output
337458
337523
  });
337459
337524
  } else if (code === null) {
337460
- resolve26({
337525
+ resolve27({
337461
337526
  success: false,
337462
337527
  output: stdout || stderr,
337463
337528
  error: `Command timed out after ${String(timeout / 1000)}s`
337464
337529
  });
337465
337530
  } else {
337466
- resolve26({
337531
+ resolve27({
337467
337532
  success: false,
337468
337533
  output: stdout,
337469
337534
  error: stderr || `Exit code: ${code}`
@@ -337471,7 +337536,7 @@ ${hint}` : stdout || stderr;
337471
337536
  }
337472
337537
  });
337473
337538
  proc.on("error", (err2) => {
337474
- resolve26({
337539
+ resolve27({
337475
337540
  success: false,
337476
337541
  output: err2.message,
337477
337542
  error: err2.message
@@ -337484,7 +337549,7 @@ ${hint}` : stdout || stderr;
337484
337549
 
337485
337550
  // src/core/skills/manager.ts
337486
337551
  import { existsSync as existsSync17, readdirSync as readdirSync5, readFileSync as readFileSync10, realpathSync as realpathSync2, rmSync as rmSync2, statSync as statSync4 } from "fs";
337487
- import { homedir as homedir14 } from "os";
337552
+ import { homedir as homedir15 } from "os";
337488
337553
  import { dirname as dirname9, join as join21 } from "path";
337489
337554
  async function searchSkills(query2) {
337490
337555
  const url2 = `https://skills.sh/api/search?q=${encodeURIComponent(query2)}`;
@@ -337554,13 +337619,13 @@ function listInstalledSkills() {
337554
337619
  const byName = new Map;
337555
337620
  const seenPaths = new Set;
337556
337621
  const dirs = [{
337557
- path: join21(homedir14(), ".soulforge", "skills"),
337622
+ path: join21(homedir15(), ".soulforge", "skills"),
337558
337623
  scope: "global"
337559
337624
  }, {
337560
- path: join21(homedir14(), ".agents", "skills"),
337625
+ path: join21(homedir15(), ".agents", "skills"),
337561
337626
  scope: "global"
337562
337627
  }, {
337563
- path: join21(homedir14(), ".claude", "skills"),
337628
+ path: join21(homedir15(), ".claude", "skills"),
337564
337629
  scope: "global"
337565
337630
  }, {
337566
337631
  path: join21(process.cwd(), ".soulforge", "skills"),
@@ -337917,7 +337982,7 @@ var init_skills = __esm(() => {
337917
337982
  import { execFile } from "child_process";
337918
337983
  import { extname as extname7, relative as relative8 } from "path";
337919
337984
  function execFileAsync(cmd, args2, opts) {
337920
- return new Promise((resolve26, reject) => {
337985
+ return new Promise((resolve27, reject) => {
337921
337986
  execFile(cmd, args2, {
337922
337987
  ...opts,
337923
337988
  encoding: "utf-8"
@@ -337925,7 +337990,7 @@ function execFileAsync(cmd, args2, opts) {
337925
337990
  if (err2)
337926
337991
  reject(err2);
337927
337992
  else
337928
- resolve26(stdout.trim());
337993
+ resolve27(stdout.trim());
337929
337994
  });
337930
337995
  });
337931
337996
  }
@@ -338686,7 +338751,7 @@ ${lines.join(`
338686
338751
 
338687
338752
  // src/core/tools/soul-find.ts
338688
338753
  import { spawn as spawn8 } from "child_process";
338689
- import { relative as relative9, resolve as resolve26 } from "path";
338754
+ import { relative as relative9, resolve as resolve27 } from "path";
338690
338755
  async function searchIntelligenceClient(repoMap, query2, cwd2, limit) {
338691
338756
  const fileMap = new Map;
338692
338757
  const words = query2.split(/\s+/).filter((w) => w.length >= 2);
@@ -338771,7 +338836,7 @@ async function searchIntelligenceClient(repoMap, query2, cwd2, limit) {
338771
338836
  existing.score += Math.min(co.count, 5);
338772
338837
  } else {
338773
338838
  fileMap.set(co.path, {
338774
- path: resolve26(cwd2, co.path),
338839
+ path: resolve27(cwd2, co.path),
338775
338840
  relPath: co.path,
338776
338841
  score: Math.min(co.count, 3),
338777
338842
  matchType: "file",
@@ -338934,7 +338999,7 @@ function fallbackFind(typeFilter) {
338934
338999
  async function enrichWithSymbols(repoMap, files, cwd2) {
338935
339000
  const results = [];
338936
339001
  for (const f of files) {
338937
- const rel = relative9(cwd2, resolve26(f));
339002
+ const rel = relative9(cwd2, resolve27(f));
338938
339003
  const syms = await repoMap.getFileSymbols(rel);
338939
339004
  const symStr = syms.length > 0 ? `
338940
339005
  ${syms.slice(0, 5).map((s) => `${s.kind} ${s.name}`).join(", ")}` : "";
@@ -338971,7 +339036,7 @@ var init_soul_find = __esm(() => {
338971
339036
  output: `No files matching "${query2}".`
338972
339037
  };
338973
339038
  }
338974
- 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(`
338975
339040
  `);
338976
339041
  return {
338977
339042
  success: true,
@@ -339058,7 +339123,7 @@ function filterForbiddenLines(output) {
339058
339123
  `) : "No matches found.";
339059
339124
  }
339060
339125
  function runCount(bin, args2) {
339061
- return new Promise((resolve27) => {
339126
+ return new Promise((resolve28) => {
339062
339127
  const proc = spawn9(bin, args2, {
339063
339128
  cwd: process.cwd(),
339064
339129
  timeout: 15000
@@ -339067,7 +339132,7 @@ function runCount(bin, args2) {
339067
339132
  proc.stdout.on("data", (d) => chunks.push(d.toString()));
339068
339133
  proc.on("close", (code) => {
339069
339134
  if (code !== 0 && code !== 1) {
339070
- resolve27({
339135
+ resolve28({
339071
339136
  success: false,
339072
339137
  output: "ripgrep failed",
339073
339138
  error: `exit ${String(code)}`
@@ -339076,7 +339141,7 @@ function runCount(bin, args2) {
339076
339141
  }
339077
339142
  const raw = chunks.join("");
339078
339143
  if (!raw.trim()) {
339079
- resolve27({
339144
+ resolve28({
339080
339145
  success: true,
339081
339146
  output: "0 matches."
339082
339147
  });
@@ -339104,14 +339169,14 @@ function runCount(bin, args2) {
339104
339169
  if (entries2.length > 25) {
339105
339170
  lines.push(` ... and ${String(entries2.length - 25)} more files`);
339106
339171
  }
339107
- resolve27({
339172
+ resolve28({
339108
339173
  success: true,
339109
339174
  output: lines.join(`
339110
339175
  `)
339111
339176
  });
339112
339177
  });
339113
339178
  proc.on("error", (err2) => {
339114
- resolve27({
339179
+ resolve28({
339115
339180
  success: false,
339116
339181
  output: err2.message,
339117
339182
  error: err2.message
@@ -339120,7 +339185,7 @@ function runCount(bin, args2) {
339120
339185
  });
339121
339186
  }
339122
339187
  async function runSearch(bin, args2) {
339123
- const rawOutput = await new Promise((resolve27) => {
339188
+ const rawOutput = await new Promise((resolve28) => {
339124
339189
  const proc = spawn9(bin, args2, {
339125
339190
  cwd: process.cwd(),
339126
339191
  timeout: 1e4
@@ -339145,13 +339210,13 @@ async function runSearch(bin, args2) {
339145
339210
  [output capped \u2014 narrow with glob or path params]`;
339146
339211
  }
339147
339212
  if (code === 0 || code === 1) {
339148
- resolve27(output || "No matches found.");
339213
+ resolve28(output || "No matches found.");
339149
339214
  } else {
339150
- resolve27(output || "No matches found.");
339215
+ resolve28(output || "No matches found.");
339151
339216
  }
339152
339217
  });
339153
339218
  proc.on("error", () => {
339154
- resolve27("No matches found.");
339219
+ resolve28("No matches found.");
339155
339220
  });
339156
339221
  });
339157
339222
  const sanitized = filterForbiddenLines(rawOutput);
@@ -339311,7 +339376,7 @@ Co-change only (related by git history, not imports):`);
339311
339376
  };
339312
339377
  }
339313
339378
  function execFileAsync2(cmd, args2, opts) {
339314
- return new Promise((resolve27, reject) => {
339379
+ return new Promise((resolve28, reject) => {
339315
339380
  execFile2(cmd, args2, {
339316
339381
  ...opts,
339317
339382
  encoding: "utf-8"
@@ -339319,7 +339384,7 @@ function execFileAsync2(cmd, args2, opts) {
339319
339384
  if (err2)
339320
339385
  reject(err2);
339321
339386
  else
339322
- resolve27(stdout.trim());
339387
+ resolve28(stdout.trim());
339323
339388
  });
339324
339389
  });
339325
339390
  }
@@ -339660,7 +339725,7 @@ ${added.join(`
339660
339725
 
339661
339726
  // src/core/tools/test-scaffold.ts
339662
339727
  import { access as access4, mkdir as mkdir5, stat as stat5, writeFile as writeFile10 } from "fs/promises";
339663
- 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";
339664
339729
  async function fileExists(path) {
339665
339730
  try {
339666
339731
  await access4(path);
@@ -339710,7 +339775,7 @@ var init_test_scaffold = __esm(() => {
339710
339775
  try {
339711
339776
  const client = getIntelligenceClient();
339712
339777
  const router2 = getIntelligenceRouter(process.cwd());
339713
- const file2 = resolve27(args2.file);
339778
+ const file2 = resolve28(args2.file);
339714
339779
  const language = router2.detectLanguage(file2);
339715
339780
  const framework = args2.framework ?? await detectTestFramework(process.cwd());
339716
339781
  let outline;
@@ -339809,7 +339874,7 @@ var init_test_scaffold = __esm(() => {
339809
339874
  lines.push("");
339810
339875
  const content = lines.join(`
339811
339876
  `);
339812
- const resolvedOutput = resolve27(outputPath);
339877
+ const resolvedOutput = resolve28(outputPath);
339813
339878
  const blocked = isForbidden(resolvedOutput);
339814
339879
  if (blocked) {
339815
339880
  return {
@@ -340843,7 +340908,7 @@ var init_web_search2 = __esm(() => {
340843
340908
 
340844
340909
  // src/core/tools/bus-cache.ts
340845
340910
  import { readFile as readFileAsync } from "fs/promises";
340846
- import { resolve as resolve28 } from "path";
340911
+ import { resolve as resolve29 } from "path";
340847
340912
  function wrapWithBusCache(tools, bus, agentId, repoMap) {
340848
340913
  const wrapped = {
340849
340914
  ...tools
@@ -341019,7 +341084,7 @@ ${text2}`
341019
341084
  const result = await origEdit(args2, opts);
341020
341085
  const isOk = result && typeof result === "object" && result.success === true;
341021
341086
  if (isOk) {
341022
- 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));
341023
341088
  } else {
341024
341089
  bus.invalidateFile(normalized);
341025
341090
  }
@@ -341058,7 +341123,7 @@ ${text2}`;
341058
341123
  const result = await origMultiEdit(args2, opts);
341059
341124
  const isOk = result && typeof result === "object" && result.success === true;
341060
341125
  if (isOk) {
341061
- 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));
341062
341127
  } else {
341063
341128
  bus.invalidateFile(normalized);
341064
341129
  }
@@ -341370,7 +341435,7 @@ var init_interactive = __esm(() => {
341370
341435
  });
341371
341436
 
341372
341437
  // src/core/tools/index.ts
341373
- import { resolve as resolve29 } from "path";
341438
+ import { resolve as resolve30 } from "path";
341374
341439
  function deferExecute(fn) {
341375
341440
  return async (args2) => {
341376
341441
  await new Promise((r) => setTimeout(r, 0));
@@ -341492,7 +341557,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341492
341557
  fresh: freshField()
341493
341558
  }),
341494
341559
  execute: deferExecute(async (args2) => {
341495
- const normPath = resolve29(args2.path);
341560
+ const normPath = resolve30(args2.path);
341496
341561
  const isFullRead = args2.startLine == null && args2.endLine == null && !args2.target;
341497
341562
  if (!args2.fresh && fullReadCache.has(normPath)) {
341498
341563
  if (isFullRead) {
@@ -341543,7 +341608,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341543
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.")
341544
341609
  }),
341545
341610
  execute: deferExecute(async (args2) => {
341546
- const gate = await gateOutsideCwd("edit_file", resolve29(args2.path));
341611
+ const gate = await gateOutsideCwd("edit_file", resolve30(args2.path));
341547
341612
  if (gate.blocked)
341548
341613
  return gate.result;
341549
341614
  if (opts?.onApproveDestructive && isSensitiveFile(args2.path)) {
@@ -341557,7 +341622,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341557
341622
  };
341558
341623
  }
341559
341624
  }
341560
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
341625
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
341561
341626
  const result = await editFileTool.execute({
341562
341627
  ...args2,
341563
341628
  tabId: opts?.tabId
@@ -341610,7 +341675,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341610
341675
  })).describe("Array of edits to apply atomically")
341611
341676
  }),
341612
341677
  execute: deferExecute(async (args2) => {
341613
- const gate = await gateOutsideCwd("multi_edit", resolve29(args2.path));
341678
+ const gate = await gateOutsideCwd("multi_edit", resolve30(args2.path));
341614
341679
  if (gate.blocked)
341615
341680
  return gate.result;
341616
341681
  if (opts?.onApproveDestructive && isSensitiveFile(args2.path)) {
@@ -341624,7 +341689,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341624
341689
  };
341625
341690
  }
341626
341691
  }
341627
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
341692
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
341628
341693
  const result = await multiEditTool.execute({
341629
341694
  ...args2,
341630
341695
  tabId: opts?.tabId
@@ -341743,7 +341808,7 @@ function buildTools(cwd2, _editorSettings, onApproveWebSearch, opts) {
341743
341808
  resetReadCounter();
341744
341809
  resetReadCache();
341745
341810
  if (args2.cwd) {
341746
- const gate = await gateOutsideCwd("shell", resolve29(args2.cwd));
341811
+ const gate = await gateOutsideCwd("shell", resolve30(args2.cwd));
341747
341812
  if (gate.blocked)
341748
341813
  return gate.result;
341749
341814
  }
@@ -341922,11 +341987,11 @@ ${crossTabWarning}` : `Shell: ${desc}
341922
341987
  }),
341923
341988
  execute: deferExecute(async (args2) => {
341924
341989
  if (args2.file) {
341925
- const gate = await gateOutsideCwd("rename_symbol", resolve29(args2.file));
341990
+ const gate = await gateOutsideCwd("rename_symbol", resolve30(args2.file));
341926
341991
  if (gate.blocked)
341927
341992
  return gate.result;
341928
341993
  }
341929
- 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;
341930
341995
  const result = await renameSymbolTool.execute({
341931
341996
  ...args2,
341932
341997
  tabId: opts?.tabId
@@ -341946,11 +342011,11 @@ ${crossTabWarning}` : `Shell: ${desc}
341946
342011
  to: exports_external.string().describe("Target file path (created if it doesn't exist)")
341947
342012
  }),
341948
342013
  execute: deferExecute(async (args2) => {
341949
- const gate = await gateOutsideCwd("move_symbol", resolve29(args2.to));
342014
+ const gate = await gateOutsideCwd("move_symbol", resolve30(args2.to));
341950
342015
  if (gate.blocked)
341951
342016
  return gate.result;
341952
- const fromWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
341953
- 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));
341954
342019
  const result = await moveSymbolTool.execute({
341955
342020
  ...args2,
341956
342021
  tabId: opts?.tabId
@@ -341969,10 +342034,10 @@ ${crossTabWarning}` : `Shell: ${desc}
341969
342034
  to: exports_external.string().describe("New file path")
341970
342035
  }),
341971
342036
  execute: deferExecute(async (args2) => {
341972
- const gate = await gateOutsideCwd("rename_file", resolve29(args2.to));
342037
+ const gate = await gateOutsideCwd("rename_file", resolve30(args2.to));
341973
342038
  if (gate.blocked)
341974
342039
  return gate.result;
341975
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
342040
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.from));
341976
342041
  const result = await renameFileTool.execute({
341977
342042
  ...args2,
341978
342043
  tabId: opts?.tabId
@@ -341997,11 +342062,11 @@ ${crossTabWarning}` : `Shell: ${desc}
341997
342062
  }),
341998
342063
  execute: deferExecute(async (args2) => {
341999
342064
  if (args2.file) {
342000
- const gate = await gateOutsideCwd("refactor", resolve29(args2.file));
342065
+ const gate = await gateOutsideCwd("refactor", resolve30(args2.file));
342001
342066
  if (gate.blocked)
342002
342067
  return gate.result;
342003
342068
  }
342004
- 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;
342005
342070
  const result = await refactorTool.execute({
342006
342071
  ...args2,
342007
342072
  tabId: opts?.tabId
@@ -342055,7 +342120,7 @@ ${crossTabWarning}` : `Shell: ${desc}
342055
342120
  execute: deferExecute(async (args2) => {
342056
342121
  const result = await testScaffoldTool.execute(args2);
342057
342122
  if (result.success && args2.output) {
342058
- claimAfterCompoundEdit(opts?.tabId, opts?.tabLabel, [resolve29(args2.output)]);
342123
+ claimAfterCompoundEdit(opts?.tabId, opts?.tabLabel, [resolve30(args2.output)]);
342059
342124
  }
342060
342125
  return result;
342061
342126
  })
@@ -342438,7 +342503,7 @@ function buildSubagentCodeTools(opts) {
342438
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.")
342439
342504
  }),
342440
342505
  execute: deferExecute(async (args2) => {
342441
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
342506
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
342442
342507
  const result = await editFileTool.execute({
342443
342508
  ...args2,
342444
342509
  tabId: opts?.tabId
@@ -342465,7 +342530,7 @@ function buildSubagentCodeTools(opts) {
342465
342530
  })).describe("Array of edits to apply atomically")
342466
342531
  }),
342467
342532
  execute: deferExecute(async (args2) => {
342468
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.path));
342533
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.path));
342469
342534
  const result = await multiEditTool.execute({
342470
342535
  ...args2,
342471
342536
  tabId: opts?.tabId
@@ -342482,7 +342547,7 @@ function buildSubagentCodeTools(opts) {
342482
342547
  file: exports_external.string().nullable().optional().transform(nullToUndef).describe("File where the symbol is defined (optional)")
342483
342548
  }),
342484
342549
  execute: deferExecute(async (args2) => {
342485
- 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;
342486
342551
  const result = await renameSymbolTool.execute({
342487
342552
  ...args2,
342488
342553
  tabId: opts?.tabId
@@ -342502,8 +342567,8 @@ function buildSubagentCodeTools(opts) {
342502
342567
  to: exports_external.string().describe("Target file path")
342503
342568
  }),
342504
342569
  execute: deferExecute(async (args2) => {
342505
- const fromWarn = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
342506
- 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));
342507
342572
  const result = await moveSymbolTool.execute({
342508
342573
  ...args2,
342509
342574
  tabId: opts?.tabId
@@ -342522,7 +342587,7 @@ function buildSubagentCodeTools(opts) {
342522
342587
  to: exports_external.string().describe("New file path")
342523
342588
  }),
342524
342589
  execute: deferExecute(async (args2) => {
342525
- const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve29(args2.from));
342590
+ const warning = checkAndClaim(opts?.tabId, opts?.tabLabel, resolve30(args2.from));
342526
342591
  const result = await renameFileTool.execute({
342527
342592
  ...args2,
342528
342593
  tabId: opts?.tabId
@@ -342546,7 +342611,7 @@ function buildSubagentCodeTools(opts) {
342546
342611
  apply: exports_external.boolean().nullable().optional().transform(nullToUndef).describe("Apply changes to disk (default true)")
342547
342612
  }),
342548
342613
  execute: deferExecute(async (args2) => {
342549
- 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;
342550
342615
  const result = await refactorTool.execute({
342551
342616
  ...args2,
342552
342617
  tabId: opts?.tabId
@@ -343872,15 +343937,15 @@ function isRetryable(error48, abortSignal) {
343872
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");
343873
343938
  }
343874
343939
  function sleep(ms, signal) {
343875
- return new Promise((resolve30) => {
343940
+ return new Promise((resolve31) => {
343876
343941
  if (signal?.aborted) {
343877
- resolve30();
343942
+ resolve31();
343878
343943
  return;
343879
343944
  }
343880
- const timer = setTimeout(resolve30, ms);
343945
+ const timer = setTimeout(resolve31, ms);
343881
343946
  signal?.addEventListener("abort", () => {
343882
343947
  clearTimeout(timer);
343883
- resolve30();
343948
+ resolve31();
343884
343949
  }, {
343885
343950
  once: true
343886
343951
  });
@@ -345590,7 +345655,7 @@ ${postParts.join(`
345590
345655
  const inflightWaiters = [];
345591
345656
  const acquireConcurrencySlot = async () => {
345592
345657
  while (inflightCount >= MAX_CONCURRENT_AGENTS) {
345593
- await new Promise((resolve30) => inflightWaiters.push(resolve30));
345658
+ await new Promise((resolve31) => inflightWaiters.push(resolve31));
345594
345659
  }
345595
345660
  inflightCount++;
345596
345661
  };
@@ -351327,14 +351392,14 @@ var require_async_iterator = __commonJS((exports, module2) => {
351327
351392
  };
351328
351393
  }
351329
351394
  function readAndResolve(iter) {
351330
- var resolve30 = iter[kLastResolve];
351331
- if (resolve30 !== null) {
351395
+ var resolve31 = iter[kLastResolve];
351396
+ if (resolve31 !== null) {
351332
351397
  var data = iter[kStream].read();
351333
351398
  if (data !== null) {
351334
351399
  iter[kLastPromise] = null;
351335
351400
  iter[kLastResolve] = null;
351336
351401
  iter[kLastReject] = null;
351337
- resolve30(createIterResult(data, false));
351402
+ resolve31(createIterResult(data, false));
351338
351403
  }
351339
351404
  }
351340
351405
  }
@@ -351342,13 +351407,13 @@ var require_async_iterator = __commonJS((exports, module2) => {
351342
351407
  process.nextTick(readAndResolve, iter);
351343
351408
  }
351344
351409
  function wrapForNext(lastPromise, iter) {
351345
- return function(resolve30, reject) {
351410
+ return function(resolve31, reject) {
351346
351411
  lastPromise.then(function() {
351347
351412
  if (iter[kEnded]) {
351348
- resolve30(createIterResult(undefined, true));
351413
+ resolve31(createIterResult(undefined, true));
351349
351414
  return;
351350
351415
  }
351351
- iter[kHandlePromise](resolve30, reject);
351416
+ iter[kHandlePromise](resolve31, reject);
351352
351417
  }, reject);
351353
351418
  };
351354
351419
  }
@@ -351367,12 +351432,12 @@ var require_async_iterator = __commonJS((exports, module2) => {
351367
351432
  return Promise.resolve(createIterResult(undefined, true));
351368
351433
  }
351369
351434
  if (this[kStream].destroyed) {
351370
- return new Promise(function(resolve30, reject) {
351435
+ return new Promise(function(resolve31, reject) {
351371
351436
  process.nextTick(function() {
351372
351437
  if (_this[kError]) {
351373
351438
  reject(_this[kError]);
351374
351439
  } else {
351375
- resolve30(createIterResult(undefined, true));
351440
+ resolve31(createIterResult(undefined, true));
351376
351441
  }
351377
351442
  });
351378
351443
  });
@@ -351395,13 +351460,13 @@ var require_async_iterator = __commonJS((exports, module2) => {
351395
351460
  return this;
351396
351461
  }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
351397
351462
  var _this2 = this;
351398
- return new Promise(function(resolve30, reject) {
351463
+ return new Promise(function(resolve31, reject) {
351399
351464
  _this2[kStream].destroy(null, function(err2) {
351400
351465
  if (err2) {
351401
351466
  reject(err2);
351402
351467
  return;
351403
351468
  }
351404
- resolve30(createIterResult(undefined, true));
351469
+ resolve31(createIterResult(undefined, true));
351405
351470
  });
351406
351471
  });
351407
351472
  }), _Object$setPrototypeO), AsyncIteratorPrototype);
@@ -351423,15 +351488,15 @@ var require_async_iterator = __commonJS((exports, module2) => {
351423
351488
  value: stream._readableState.endEmitted,
351424
351489
  writable: true
351425
351490
  }), _defineProperty(_Object$create, kHandlePromise, {
351426
- value: function value(resolve30, reject) {
351491
+ value: function value(resolve31, reject) {
351427
351492
  var data = iterator[kStream].read();
351428
351493
  if (data) {
351429
351494
  iterator[kLastPromise] = null;
351430
351495
  iterator[kLastResolve] = null;
351431
351496
  iterator[kLastReject] = null;
351432
- resolve30(createIterResult(data, false));
351497
+ resolve31(createIterResult(data, false));
351433
351498
  } else {
351434
- iterator[kLastResolve] = resolve30;
351499
+ iterator[kLastResolve] = resolve31;
351435
351500
  iterator[kLastReject] = reject;
351436
351501
  }
351437
351502
  },
@@ -351450,12 +351515,12 @@ var require_async_iterator = __commonJS((exports, module2) => {
351450
351515
  iterator[kError] = err2;
351451
351516
  return;
351452
351517
  }
351453
- var resolve30 = iterator[kLastResolve];
351454
- if (resolve30 !== null) {
351518
+ var resolve31 = iterator[kLastResolve];
351519
+ if (resolve31 !== null) {
351455
351520
  iterator[kLastPromise] = null;
351456
351521
  iterator[kLastResolve] = null;
351457
351522
  iterator[kLastReject] = null;
351458
- resolve30(createIterResult(undefined, true));
351523
+ resolve31(createIterResult(undefined, true));
351459
351524
  }
351460
351525
  iterator[kEnded] = true;
351461
351526
  });
@@ -351467,7 +351532,7 @@ var require_async_iterator = __commonJS((exports, module2) => {
351467
351532
 
351468
351533
  // node_modules/readable-stream/lib/internal/streams/from.js
351469
351534
  var require_from = __commonJS((exports, module2) => {
351470
- function asyncGeneratorStep(gen, resolve30, reject, _next, _throw, key2, arg) {
351535
+ function asyncGeneratorStep(gen, resolve31, reject, _next, _throw, key2, arg) {
351471
351536
  try {
351472
351537
  var info2 = gen[key2](arg);
351473
351538
  var value = info2.value;
@@ -351476,7 +351541,7 @@ var require_from = __commonJS((exports, module2) => {
351476
351541
  return;
351477
351542
  }
351478
351543
  if (info2.done) {
351479
- resolve30(value);
351544
+ resolve31(value);
351480
351545
  } else {
351481
351546
  Promise.resolve(value).then(_next, _throw);
351482
351547
  }
@@ -351484,13 +351549,13 @@ var require_from = __commonJS((exports, module2) => {
351484
351549
  function _asyncToGenerator(fn) {
351485
351550
  return function() {
351486
351551
  var self2 = this, args2 = arguments;
351487
- return new Promise(function(resolve30, reject) {
351552
+ return new Promise(function(resolve31, reject) {
351488
351553
  var gen = fn.apply(self2, args2);
351489
351554
  function _next(value) {
351490
- asyncGeneratorStep(gen, resolve30, reject, _next, _throw, "next", value);
351555
+ asyncGeneratorStep(gen, resolve31, reject, _next, _throw, "next", value);
351491
351556
  }
351492
351557
  function _throw(err2) {
351493
- asyncGeneratorStep(gen, resolve30, reject, _next, _throw, "throw", err2);
351558
+ asyncGeneratorStep(gen, resolve31, reject, _next, _throw, "throw", err2);
351494
351559
  }
351495
351560
  _next(undefined);
351496
351561
  });
@@ -353330,11 +353395,11 @@ var require_awaitify = __commonJS((exports, module2) => {
353330
353395
  if (typeof args2[arity2 - 1] === "function") {
353331
353396
  return asyncFn.apply(this, args2);
353332
353397
  }
353333
- return new Promise((resolve30, reject) => {
353398
+ return new Promise((resolve31, reject) => {
353334
353399
  args2[arity2 - 1] = (err2, ...cbArgs) => {
353335
353400
  if (err2)
353336
353401
  return reject(err2);
353337
- resolve30(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
353402
+ resolve31(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
353338
353403
  };
353339
353404
  asyncFn.apply(this, args2);
353340
353405
  });
@@ -353950,11 +354015,11 @@ var require_diagnostics = __commonJS((exports, module2) => {
353950
354015
  }
353951
354016
  if (!async.length)
353952
354017
  return false;
353953
- return new Promise(function pinky(resolve30) {
354018
+ return new Promise(function pinky(resolve31) {
353954
354019
  Promise.all(async.map(function prebind(fn) {
353955
354020
  return fn(namespace);
353956
354021
  })).then(function resolved(values) {
353957
- resolve30(values.some(Boolean));
354022
+ resolve31(values.some(Boolean));
353958
354023
  });
353959
354024
  });
353960
354025
  }
@@ -357785,11 +357850,11 @@ var require_logger2 = __commonJS((exports) => {
357785
357850
  var require_Base = __commonJS((exports) => {
357786
357851
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
357787
357852
  function adopt(value) {
357788
- return value instanceof P ? value : new P(function(resolve30) {
357789
- resolve30(value);
357853
+ return value instanceof P ? value : new P(function(resolve31) {
357854
+ resolve31(value);
357790
357855
  });
357791
357856
  }
357792
- return new (P || (P = Promise))(function(resolve30, reject) {
357857
+ return new (P || (P = Promise))(function(resolve31, reject) {
357793
357858
  function fulfilled(value) {
357794
357859
  try {
357795
357860
  step(generator.next(value));
@@ -357805,7 +357870,7 @@ var require_Base = __commonJS((exports) => {
357805
357870
  }
357806
357871
  }
357807
357872
  function step(result) {
357808
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
357873
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
357809
357874
  }
357810
357875
  step((generator = generator.apply(thisArg, _arguments || [])).next());
357811
357876
  });
@@ -357822,7 +357887,7 @@ var require_Base = __commonJS((exports) => {
357822
357887
  constructor({ transport, data, logger, metadata: metadata2, client }) {
357823
357888
  super();
357824
357889
  this._isReady = Promise.resolve(false);
357825
- this[_a27] = (name21, args2 = []) => new Promise((resolve30, reject) => {
357890
+ this[_a27] = (name21, args2 = []) => new Promise((resolve31, reject) => {
357826
357891
  this.transport.request(name21, args2, (err2, res) => {
357827
357892
  if (this.logger.level === "debug") {
357828
357893
  let logData;
@@ -357836,7 +357901,7 @@ var require_Base = __commonJS((exports) => {
357836
357901
  if (err2) {
357837
357902
  reject(new Error(`${name21}: ${err2[1]}`));
357838
357903
  } else {
357839
- resolve30(res);
357904
+ resolve31(res);
357840
357905
  }
357841
357906
  });
357842
357907
  });
@@ -357916,11 +357981,11 @@ var require_Base = __commonJS((exports) => {
357916
357981
  var require_Buffer = __commonJS((exports) => {
357917
357982
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
357918
357983
  function adopt(value) {
357919
- return value instanceof P ? value : new P(function(resolve30) {
357920
- resolve30(value);
357984
+ return value instanceof P ? value : new P(function(resolve31) {
357985
+ resolve31(value);
357921
357986
  });
357922
357987
  }
357923
- return new (P || (P = Promise))(function(resolve30, reject) {
357988
+ return new (P || (P = Promise))(function(resolve31, reject) {
357924
357989
  function fulfilled(value) {
357925
357990
  try {
357926
357991
  step(generator.next(value));
@@ -357936,7 +358001,7 @@ var require_Buffer = __commonJS((exports) => {
357936
358001
  }
357937
358002
  }
357938
358003
  function step(result) {
357939
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
358004
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
357940
358005
  }
357941
358006
  step((generator = generator.apply(thisArg, _arguments || [])).next());
357942
358007
  });
@@ -358300,11 +358365,11 @@ var require_types2 = __commonJS((exports) => {
358300
358365
  var require_transport = __commonJS((exports) => {
358301
358366
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
358302
358367
  function adopt(value) {
358303
- return value instanceof P ? value : new P(function(resolve30) {
358304
- resolve30(value);
358368
+ return value instanceof P ? value : new P(function(resolve31) {
358369
+ resolve31(value);
358305
358370
  });
358306
358371
  }
358307
- return new (P || (P = Promise))(function(resolve30, reject) {
358372
+ return new (P || (P = Promise))(function(resolve31, reject) {
358308
358373
  function fulfilled(value) {
358309
358374
  try {
358310
358375
  step(generator.next(value));
@@ -358320,7 +358385,7 @@ var require_transport = __commonJS((exports) => {
358320
358385
  }
358321
358386
  }
358322
358387
  function step(result) {
358323
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
358388
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
358324
358389
  }
358325
358390
  step((generator = generator.apply(thisArg, _arguments || [])).next());
358326
358391
  });
@@ -358449,8 +358514,8 @@ var require_transport = __commonJS((exports) => {
358449
358514
  }
358450
358515
  close() {
358451
358516
  return __awaiter(this, undefined, undefined, function* () {
358452
- return new Promise((resolve30) => {
358453
- this.writer.end(resolve30);
358517
+ return new Promise((resolve31) => {
358518
+ this.writer.end(resolve31);
358454
358519
  });
358455
358520
  });
358456
358521
  }
@@ -358727,11 +358792,11 @@ var require_Neovim = __commonJS((exports) => {
358727
358792
  var require_client = __commonJS((exports) => {
358728
358793
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
358729
358794
  function adopt(value) {
358730
- return value instanceof P ? value : new P(function(resolve30) {
358731
- resolve30(value);
358795
+ return value instanceof P ? value : new P(function(resolve31) {
358796
+ resolve31(value);
358732
358797
  });
358733
358798
  }
358734
- return new (P || (P = Promise))(function(resolve30, reject) {
358799
+ return new (P || (P = Promise))(function(resolve31, reject) {
358735
358800
  function fulfilled(value) {
358736
358801
  try {
358737
358802
  step(generator.next(value));
@@ -358747,7 +358812,7 @@ var require_client = __commonJS((exports) => {
358747
358812
  }
358748
358813
  }
358749
358814
  function step(result) {
358750
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
358815
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
358751
358816
  }
358752
358817
  step((generator = generator.apply(thisArg, _arguments || [])).next());
358753
358818
  });
@@ -358852,12 +358917,12 @@ var require_client = __commonJS((exports) => {
358852
358917
  this._isReady = this.generateApi();
358853
358918
  }
358854
358919
  requestApi() {
358855
- return new Promise((resolve30, reject) => {
358920
+ return new Promise((resolve31, reject) => {
358856
358921
  this.transport.request("nvim_get_api_info", [], (err2, res) => {
358857
358922
  if (err2) {
358858
358923
  reject(err2);
358859
358924
  } else {
358860
- resolve30(res);
358925
+ resolve31(res);
358861
358926
  }
358862
358927
  });
358863
358928
  });
@@ -359023,11 +359088,11 @@ var require_properties = __commonJS((exports) => {
359023
359088
  var require_NvimPlugin = __commonJS((exports) => {
359024
359089
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
359025
359090
  function adopt(value) {
359026
- return value instanceof P ? value : new P(function(resolve30) {
359027
- resolve30(value);
359091
+ return value instanceof P ? value : new P(function(resolve31) {
359092
+ resolve31(value);
359028
359093
  });
359029
359094
  }
359030
- return new (P || (P = Promise))(function(resolve30, reject) {
359095
+ return new (P || (P = Promise))(function(resolve31, reject) {
359031
359096
  function fulfilled(value) {
359032
359097
  try {
359033
359098
  step(generator.next(value));
@@ -359043,7 +359108,7 @@ var require_NvimPlugin = __commonJS((exports) => {
359043
359108
  }
359044
359109
  }
359045
359110
  function step(result) {
359046
- result.done ? resolve30(result.value) : adopt(result.value).then(fulfilled, rejected);
359111
+ result.done ? resolve31(result.value) : adopt(result.value).then(fulfilled, rejected);
359047
359112
  }
359048
359113
  step((generator = generator.apply(thisArg, _arguments || [])).next());
359049
359114
  });
@@ -360129,7 +360194,7 @@ __export(exports_neovim, {
360129
360194
  });
360130
360195
  import { spawn as spawn10 } from "child_process";
360131
360196
  import { existsSync as existsSync19, rmSync as rmSync3 } from "fs";
360132
- import { homedir as homedir15 } from "os";
360197
+ import { homedir as homedir16 } from "os";
360133
360198
  import { join as join26 } from "path";
360134
360199
  function setNeovimFileWrittenHandler(handler4) {
360135
360200
  _onFileWritten = handler4;
@@ -360139,7 +360204,7 @@ async function launchNeovim(nvimPath, cols = DEFAULT_COLS, rows = DEFAULT_ROWS,
360139
360204
  let effectivePath = nvimPath;
360140
360205
  const args2 = ["--embed", "-i", "NONE"];
360141
360206
  const isBundled = import.meta.url.includes("$bunfs");
360142
- const bundledInit = join26(homedir15(), ".soulforge", "init.lua");
360207
+ const bundledInit = join26(homedir16(), ".soulforge", "init.lua");
360143
360208
  const devInit = join26(import.meta.dir, "init.lua");
360144
360209
  const shippedInit = isBundled ? bundledInit : existsSync19(devInit) ? devInit : bundledInit;
360145
360210
  switch (configMode) {
@@ -360251,7 +360316,7 @@ function killBootstrap() {
360251
360316
  _bootstrapProc.kill();
360252
360317
  } catch {}
360253
360318
  _bootstrapProc = null;
360254
- const lazyDir = join26(homedir15(), ".local", "share", "soulforge", "lazy");
360319
+ const lazyDir = join26(homedir16(), ".local", "share", "soulforge", "lazy");
360255
360320
  try {
360256
360321
  rmSync3(lazyDir, {
360257
360322
  recursive: true,
@@ -360262,12 +360327,12 @@ function killBootstrap() {
360262
360327
  }
360263
360328
  function bootstrapNeovimPlugins(nvimPath) {
360264
360329
  const isBundled = import.meta.url.includes("$bunfs");
360265
- const bundledInit = join26(homedir15(), ".soulforge", "init.lua");
360330
+ const bundledInit = join26(homedir16(), ".soulforge", "init.lua");
360266
360331
  const devInit = join26(import.meta.dir, "init.lua");
360267
360332
  const shippedInit = isBundled ? bundledInit : existsSync19(devInit) ? devInit : bundledInit;
360268
360333
  if (!existsSync19(shippedInit))
360269
360334
  return;
360270
- const dataDir = join26(homedir15(), ".local", "share", "soulforge");
360335
+ const dataDir = join26(homedir16(), ".local", "share", "soulforge");
360271
360336
  const lazyDir = join26(dataDir, "lazy");
360272
360337
  if (existsSync19(lazyDir))
360273
360338
  return;
@@ -360669,10 +360734,11 @@ var init_prompts = __esm(() => {
360669
360734
  });
360670
360735
 
360671
360736
  // src/core/workers/intelligence-client.ts
360672
- import { homedir as homedir16 } from "os";
360737
+ import { homedir as homedir17 } from "os";
360673
360738
  import { join as join27 } from "path";
360674
360739
  var IS_COMPILED2, IS_DIST2, IntelligenceClient;
360675
360740
  var init_intelligence_client = __esm(() => {
360741
+ init_errors();
360676
360742
  init_workers();
360677
360743
  IS_COMPILED2 = import.meta.url.includes("$bunfs");
360678
360744
  IS_DIST2 = !IS_COMPILED2 && import.meta.dir.includes("/dist");
@@ -360692,9 +360758,9 @@ var init_intelligence_client = __esm(() => {
360692
360758
  onProgress = null;
360693
360759
  onScanComplete = null;
360694
360760
  onStaleSymbols = null;
360695
- static SCAN_TIMEOUT = 300000;
360761
+ static SCAN_IDLE_TIMEOUT = 120000;
360696
360762
  constructor(cwd2) {
360697
- 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");
360698
360764
  super(workerPath, {
360699
360765
  cwd: cwd2
360700
360766
  });
@@ -360752,6 +360818,10 @@ var init_intelligence_client = __esm(() => {
360752
360818
  const d = data;
360753
360819
  this.onStaleSymbols?.(d.count);
360754
360820
  });
360821
+ this.on("index-error", (data) => {
360822
+ const d = data;
360823
+ logBackgroundError("Soul Map", d.message);
360824
+ });
360755
360825
  }
360756
360826
  get isReady() {
360757
360827
  return this._isReady;
@@ -360760,7 +360830,33 @@ var init_intelligence_client = __esm(() => {
360760
360830
  return this._cwd;
360761
360831
  }
360762
360832
  async scan() {
360763
- await this.callWithTimeout(IntelligenceClient.SCAN_TIMEOUT, "scan");
360833
+ let timer;
360834
+ let rejectScan;
360835
+ const resetTimer = () => {
360836
+ if (timer)
360837
+ clearTimeout(timer);
360838
+ timer = setTimeout(() => {
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);
360843
+ }, IntelligenceClient.SCAN_IDLE_TIMEOUT);
360844
+ };
360845
+ this.on("progress", resetTimer);
360846
+ resetTimer();
360847
+ try {
360848
+ await Promise.race([this.call("scan"), new Promise((_, reject) => {
360849
+ rejectScan = reject;
360850
+ })]);
360851
+ } catch (err2) {
360852
+ const msg = err2 instanceof Error ? err2.message : String(err2);
360853
+ logBackgroundError("Soul Map", `Scan failed: ${msg}`);
360854
+ throw err2;
360855
+ } finally {
360856
+ if (timer)
360857
+ clearTimeout(timer);
360858
+ this.off("progress", resetTimer);
360859
+ }
360764
360860
  }
360765
360861
  async close() {
360766
360862
  await this.call("close");
@@ -360802,7 +360898,7 @@ var init_intelligence_client = __esm(() => {
360802
360898
  return this.call("generateSyntheticSummaries", limit);
360803
360899
  }
360804
360900
  async generateSemanticSummaries(maxSymbols) {
360805
- return this.callWithTimeout(IntelligenceClient.SCAN_TIMEOUT, "generateSemanticSummaries", maxSymbols);
360901
+ return this.callWithTimeout(300000, "generateSemanticSummaries", maxSymbols);
360806
360902
  }
360807
360903
  clearFreeSummaries() {
360808
360904
  this.fire("clearFreeSummaries");
@@ -361448,13 +361544,13 @@ class ContextManager {
361448
361544
  return Promise.resolve(false);
361449
361545
  if (this.isRepoMapReady())
361450
361546
  return Promise.resolve(true);
361451
- return new Promise((resolve30) => {
361547
+ return new Promise((resolve31) => {
361452
361548
  const start2 = Date.now();
361453
361549
  const check2 = () => {
361454
361550
  if (this.isRepoMapReady())
361455
- return resolve30(true);
361551
+ return resolve31(true);
361456
361552
  if (Date.now() - start2 > timeoutMs)
361457
- return resolve30(false);
361553
+ return resolve31(false);
361458
361554
  setTimeout(check2, 200);
361459
361555
  };
361460
361556
  check2();
@@ -381117,7 +381213,7 @@ var init_instructions = __esm(() => {
381117
381213
 
381118
381214
  // src/headless/run.ts
381119
381215
  import { existsSync as existsSync23, readFileSync as readFileSync13 } from "fs";
381120
- import { resolve as resolve30 } from "path";
381216
+ import { resolve as resolve31 } from "path";
381121
381217
  async function setupAgent(opts, merged) {
381122
381218
  const cwd2 = opts.cwd ?? process.cwd();
381123
381219
  const mode = opts.mode ?? "default";
@@ -381409,7 +381505,7 @@ async function runPrompt(opts, merged) {
381409
381505
  if (opts.include && opts.include.length > 0) {
381410
381506
  const fileParts = [];
381411
381507
  for (const file2 of opts.include) {
381412
- const fullPath = resolve30(env.cwd, file2);
381508
+ const fullPath = resolve31(env.cwd, file2);
381413
381509
  if (!existsSync23(fullPath)) {
381414
381510
  stderrWarn(`--include file not found: ${file2}`);
381415
381511
  continue;
@@ -381568,7 +381664,7 @@ ${prompt}`;
381568
381664
  process.exit(exitCode);
381569
381665
  }
381570
381666
  function readPromptFromStdin() {
381571
- return new Promise((resolve31) => {
381667
+ return new Promise((resolve32) => {
381572
381668
  while (stdinBuf.includes(`
381573
381669
  `)) {
381574
381670
  const idx = stdinBuf.indexOf(`
@@ -381582,14 +381678,14 @@ ${stdinBuf}`;
381582
381678
  }
381583
381679
  const prompt = line2.trim();
381584
381680
  if (prompt.length > 0) {
381585
- resolve31(prompt);
381681
+ resolve32(prompt);
381586
381682
  return;
381587
381683
  }
381588
381684
  }
381589
381685
  if (stdinEnded) {
381590
381686
  const prompt = stdinBuf.trim();
381591
381687
  stdinBuf = "";
381592
- resolve31(prompt.length > 0 ? prompt : null);
381688
+ resolve32(prompt.length > 0 ? prompt : null);
381593
381689
  return;
381594
381690
  }
381595
381691
  if (process.stdin.isPaused())
@@ -381610,7 +381706,7 @@ ${stdinBuf}`;
381610
381706
  const prompt = line2.trim();
381611
381707
  cleanup();
381612
381708
  process.stdin.pause();
381613
- resolve31(prompt.length > 0 ? prompt : null);
381709
+ resolve32(prompt.length > 0 ? prompt : null);
381614
381710
  return;
381615
381711
  }
381616
381712
  };
@@ -381619,7 +381715,7 @@ ${stdinBuf}`;
381619
381715
  cleanup();
381620
381716
  const prompt = stdinBuf.trim();
381621
381717
  stdinBuf = "";
381622
- resolve31(prompt.length > 0 ? prompt : null);
381718
+ resolve32(prompt.length > 0 ? prompt : null);
381623
381719
  };
381624
381720
  function cleanup() {
381625
381721
  process.stdin.removeListener("data", onData);
@@ -382152,15 +382248,15 @@ function detectNerdFont() {
382152
382248
  existsSync: existsSync24
382153
382249
  } = __require("fs");
382154
382250
  const {
382155
- homedir: homedir17
382251
+ homedir: homedir18
382156
382252
  } = __require("os");
382157
382253
  const {
382158
382254
  join: join32
382159
382255
  } = __require("path");
382160
- const fontDir = join32(homedir17(), "Library", "Fonts");
382256
+ const fontDir = join32(homedir18(), "Library", "Fonts");
382161
382257
  if (existsSync24(join32(fontDir, "SymbolsNerdFont-Regular.ttf")))
382162
382258
  return true;
382163
- const linuxFontDir = join32(homedir17(), ".local", "share", "fonts");
382259
+ const linuxFontDir = join32(homedir18(), ".local", "share", "fonts");
382164
382260
  if (existsSync24(join32(linuxFontDir, "SymbolsNerdFont-Regular.ttf")))
382165
382261
  return true;
382166
382262
  } catch {}
@@ -382555,7 +382651,7 @@ import { EventEmitter } from "events";
382555
382651
  import { Buffer as Buffer2 } from "buffer";
382556
382652
  import { Buffer as Buffer3 } from "buffer";
382557
382653
  import { EventEmitter as EventEmitter2 } from "events";
382558
- import { resolve as resolve31, dirname as dirname11 } from "path";
382654
+ import { resolve as resolve32, dirname as dirname11 } from "path";
382559
382655
  import { fileURLToPath } from "url";
382560
382656
  import { resolve as resolve210, isAbsolute, parse as parse7 } from "path";
382561
382657
  import { existsSync as existsSync24 } from "fs";
@@ -385660,13 +385756,13 @@ class DebounceController {
385660
385756
  }
385661
385757
  debounce(id, ms, fn) {
385662
385758
  const scopeMap = TIMERS_MAP.get(this.scopeId);
385663
- return new Promise((resolve33, reject) => {
385759
+ return new Promise((resolve34, reject) => {
385664
385760
  if (scopeMap.has(id)) {
385665
385761
  clearTimeout(scopeMap.get(id));
385666
385762
  }
385667
385763
  const timerId = setTimeout(() => {
385668
385764
  try {
385669
- resolve33(fn());
385765
+ resolve34(fn());
385670
385766
  } catch (error48) {
385671
385767
  reject(error48);
385672
385768
  }
@@ -385756,25 +385852,25 @@ function getParsers() {
385756
385852
  filetype: "javascript",
385757
385853
  aliases: ["javascriptreact"],
385758
385854
  queries: {
385759
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default)]
385855
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default)]
385760
385856
  },
385761
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_javascript_default)
385857
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_javascript_default)
385762
385858
  },
385763
385859
  {
385764
385860
  filetype: "typescript",
385765
385861
  aliases: ["typescriptreact"],
385766
385862
  queries: {
385767
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default2)]
385863
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default2)]
385768
385864
  },
385769
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_typescript_default)
385865
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_typescript_default)
385770
385866
  },
385771
385867
  {
385772
385868
  filetype: "markdown",
385773
385869
  queries: {
385774
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default3)],
385775
- 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)]
385776
385872
  },
385777
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_default),
385873
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_default),
385778
385874
  injectionMapping: {
385779
385875
  nodeTypes: {
385780
385876
  inline: "markdown_inline",
@@ -385797,16 +385893,16 @@ function getParsers() {
385797
385893
  {
385798
385894
  filetype: "markdown_inline",
385799
385895
  queries: {
385800
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default4)]
385896
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default4)]
385801
385897
  },
385802
- 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)
385803
385899
  },
385804
385900
  {
385805
385901
  filetype: "zig",
385806
385902
  queries: {
385807
- highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default5)]
385903
+ highlights: [resolve32(dirname11(fileURLToPath(import.meta.url)), highlights_default5)]
385808
385904
  },
385809
- wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_zig_default)
385905
+ wasm: resolve32(dirname11(fileURLToPath(import.meta.url)), tree_sitter_zig_default)
385810
385906
  }
385811
385907
  ];
385812
385908
  }
@@ -396537,7 +396633,7 @@ var init_index_e89anq5x = __esm(async () => {
396537
396633
  if (this.initializePromise) {
396538
396634
  return this.initializePromise;
396539
396635
  }
396540
- this.initializePromise = new Promise((resolve33, reject) => {
396636
+ this.initializePromise = new Promise((resolve34, reject) => {
396541
396637
  const timeoutMs = this.options.initTimeout ?? 1e4;
396542
396638
  const timeoutId = setTimeout(() => {
396543
396639
  const error48 = new Error("Worker initialization timed out");
@@ -396545,7 +396641,7 @@ var init_index_e89anq5x = __esm(async () => {
396545
396641
  this.initializeResolvers = undefined;
396546
396642
  reject(error48);
396547
396643
  }, timeoutMs);
396548
- this.initializeResolvers = { resolve: resolve33, reject, timeoutId };
396644
+ this.initializeResolvers = { resolve: resolve34, reject, timeoutId };
396549
396645
  this.worker?.postMessage({
396550
396646
  type: "INIT",
396551
396647
  dataPath: this.options.dataPath
@@ -396586,8 +396682,8 @@ var init_index_e89anq5x = __esm(async () => {
396586
396682
  }
396587
396683
  async getPerformance() {
396588
396684
  const messageId = `performance_${this.messageIdCounter++}`;
396589
- return new Promise((resolve33) => {
396590
- this.messageCallbacks.set(messageId, resolve33);
396685
+ return new Promise((resolve34) => {
396686
+ this.messageCallbacks.set(messageId, resolve34);
396591
396687
  this.worker?.postMessage({ type: "GET_PERFORMANCE", messageId });
396592
396688
  });
396593
396689
  }
@@ -396600,8 +396696,8 @@ var init_index_e89anq5x = __esm(async () => {
396600
396696
  }
396601
396697
  }
396602
396698
  const messageId = `oneshot_${this.messageIdCounter++}`;
396603
- return new Promise((resolve33) => {
396604
- this.messageCallbacks.set(messageId, resolve33);
396699
+ return new Promise((resolve34) => {
396700
+ this.messageCallbacks.set(messageId, resolve34);
396605
396701
  this.worker?.postMessage({
396606
396702
  type: "ONESHOT_HIGHLIGHT",
396607
396703
  content,
@@ -396717,8 +396813,8 @@ var init_index_e89anq5x = __esm(async () => {
396717
396813
  }
396718
396814
  async preloadParser(filetype) {
396719
396815
  const messageId = `has_parser_${this.messageIdCounter++}`;
396720
- const response = await new Promise((resolve33) => {
396721
- this.messageCallbacks.set(messageId, resolve33);
396816
+ const response = await new Promise((resolve34) => {
396817
+ this.messageCallbacks.set(messageId, resolve34);
396722
396818
  this.worker?.postMessage({
396723
396819
  type: "PRELOAD_PARSER",
396724
396820
  filetype,
@@ -396745,8 +396841,8 @@ var init_index_e89anq5x = __esm(async () => {
396745
396841
  }
396746
396842
  this.buffers.set(id, { id, content, filetype, version: version2, hasParser: false });
396747
396843
  const messageId = `init_${this.messageIdCounter++}`;
396748
- const response = await new Promise((resolve33) => {
396749
- this.messageCallbacks.set(messageId, resolve33);
396844
+ const response = await new Promise((resolve34) => {
396845
+ this.messageCallbacks.set(messageId, resolve34);
396750
396846
  this.worker?.postMessage({
396751
396847
  type: "INITIALIZE_PARSER",
396752
396848
  bufferId: id,
@@ -396802,9 +396898,9 @@ var init_index_e89anq5x = __esm(async () => {
396802
396898
  this.editQueues.delete(bufferId);
396803
396899
  }
396804
396900
  if (this.worker) {
396805
- await new Promise((resolve33) => {
396901
+ await new Promise((resolve34) => {
396806
396902
  const messageId = `dispose_${bufferId}`;
396807
- this.messageCallbacks.set(messageId, resolve33);
396903
+ this.messageCallbacks.set(messageId, resolve34);
396808
396904
  try {
396809
396905
  this.worker.postMessage({
396810
396906
  type: "DISPOSE_BUFFER",
@@ -396812,13 +396908,13 @@ var init_index_e89anq5x = __esm(async () => {
396812
396908
  });
396813
396909
  } catch (error48) {
396814
396910
  console.error("Error disposing buffer", error48);
396815
- resolve33(false);
396911
+ resolve34(false);
396816
396912
  }
396817
396913
  setTimeout(() => {
396818
396914
  if (this.messageCallbacks.has(messageId)) {
396819
396915
  this.messageCallbacks.delete(messageId);
396820
396916
  console.warn({ bufferId }, "Timed out waiting for buffer to be disposed");
396821
- resolve33(false);
396917
+ resolve34(false);
396822
396918
  }
396823
396919
  }, 3000);
396824
396920
  });
@@ -396875,12 +396971,12 @@ var init_index_e89anq5x = __esm(async () => {
396875
396971
  this.options.dataPath = dataPath;
396876
396972
  if (this.initialized && this.worker) {
396877
396973
  const messageId = `update_datapath_${this.messageIdCounter++}`;
396878
- return new Promise((resolve33, reject) => {
396974
+ return new Promise((resolve34, reject) => {
396879
396975
  this.messageCallbacks.set(messageId, (response) => {
396880
396976
  if (response.error) {
396881
396977
  reject(new Error(response.error));
396882
396978
  } else {
396883
- resolve33();
396979
+ resolve34();
396884
396980
  }
396885
396981
  });
396886
396982
  this.worker.postMessage({
@@ -396896,12 +396992,12 @@ var init_index_e89anq5x = __esm(async () => {
396896
396992
  throw new Error("Cannot clear cache: client is not initialized");
396897
396993
  }
396898
396994
  const messageId = `clear_cache_${this.messageIdCounter++}`;
396899
- return new Promise((resolve33, reject) => {
396995
+ return new Promise((resolve34, reject) => {
396900
396996
  this.messageCallbacks.set(messageId, (response) => {
396901
396997
  if (response.error) {
396902
396998
  reject(new Error(response.error));
396903
396999
  } else {
396904
- resolve33();
397000
+ resolve34();
396905
397001
  }
396906
397002
  });
396907
397003
  this.worker.postMessage({
@@ -416854,8 +416950,8 @@ It can also happen if the client has a browser extension installed which messes
416854
416950
  currentEntangledActionThenable = {
416855
416951
  status: "pending",
416856
416952
  value: undefined,
416857
- then: function(resolve33) {
416858
- entangledListeners.push(resolve33);
416953
+ then: function(resolve34) {
416954
+ entangledListeners.push(resolve34);
416859
416955
  }
416860
416956
  };
416861
416957
  }
@@ -416879,8 +416975,8 @@ It can also happen if the client has a browser extension installed which messes
416879
416975
  status: "pending",
416880
416976
  value: null,
416881
416977
  reason: null,
416882
- then: function(resolve33) {
416883
- listeners.push(resolve33);
416978
+ then: function(resolve34) {
416979
+ listeners.push(resolve34);
416884
416980
  }
416885
416981
  };
416886
416982
  thenable.then(function() {
@@ -425500,7 +425596,7 @@ var init_shallow2 = __esm(() => {
425500
425596
 
425501
425597
  // src/core/commands/utils.ts
425502
425598
  import { existsSync as existsSync26, readdirSync as readdirSync7, statSync as statSync6 } from "fs";
425503
- import { homedir as homedir17 } from "os";
425599
+ import { homedir as homedir18 } from "os";
425504
425600
  import { join as join35 } from "path";
425505
425601
  function sysMsg(ctx, content) {
425506
425602
  ctx.chat.setMessages((prev) => [...prev, {
@@ -425538,7 +425634,7 @@ function fileSize(filePath) {
425538
425634
  }
425539
425635
  }
425540
425636
  function computeStorageSizes(cwd2) {
425541
- const home = homedir17();
425637
+ const home = homedir18();
425542
425638
  const projectDir = join35(cwd2, ".soulforge");
425543
425639
  const globalDir = join35(home, ".soulforge");
425544
425640
  const repoMap = fileSize(join35(projectDir, "repomap.db")) + fileSize(join35(projectDir, "repomap.db-wal")) + fileSize(join35(projectDir, "repomap.db-shm"));
@@ -425910,7 +426006,7 @@ __export(exports_terminal_font, {
425910
426006
  });
425911
426007
  import { execSync as execSync6 } from "child_process";
425912
426008
  import { existsSync as existsSync28, mkdirSync as mkdirSync10, readFileSync as readFileSync14, writeFileSync as writeFileSync8 } from "fs";
425913
- import { homedir as homedir18 } from "os";
426009
+ import { homedir as homedir19 } from "os";
425914
426010
  import { join as join36 } from "path";
425915
426011
  function detectTerminal() {
425916
426012
  const env2 = process.env;
@@ -426016,7 +426112,7 @@ function getCurrentFont() {
426016
426112
  const term = detectTerminal();
426017
426113
  switch (term.id) {
426018
426114
  case "kitty": {
426019
- const conf = join36(homedir18(), ".config", "kitty", "kitty.conf");
426115
+ const conf = join36(homedir19(), ".config", "kitty", "kitty.conf");
426020
426116
  if (!existsSync28(conf))
426021
426117
  return null;
426022
426118
  const content = readFileSync14(conf, "utf-8");
@@ -426032,7 +426128,7 @@ function getCurrentFont() {
426032
426128
  return match2?.[1] ?? null;
426033
426129
  }
426034
426130
  case "ghostty": {
426035
- const conf = join36(homedir18(), ".config", "ghostty", "config");
426131
+ const conf = join36(homedir19(), ".config", "ghostty", "config");
426036
426132
  if (!existsSync28(conf))
426037
426133
  return null;
426038
426134
  const content = readFileSync14(conf, "utf-8");
@@ -426040,7 +426136,7 @@ function getCurrentFont() {
426040
426136
  return match2?.[1]?.trim() ?? null;
426041
426137
  }
426042
426138
  case "foot": {
426043
- const conf = join36(homedir18(), ".config", "foot", "foot.ini");
426139
+ const conf = join36(homedir19(), ".config", "foot", "foot.ini");
426044
426140
  if (!existsSync28(conf))
426045
426141
  return null;
426046
426142
  const content = readFileSync14(conf, "utf-8");
@@ -426090,7 +426186,7 @@ function setTerminalFont(fontFamily, fontSize) {
426090
426186
  }
426091
426187
  }
426092
426188
  function setKittyFont(family, size) {
426093
- const confDir = join36(homedir18(), ".config", "kitty");
426189
+ const confDir = join36(homedir19(), ".config", "kitty");
426094
426190
  const conf = join36(confDir, "kitty.conf");
426095
426191
  mkdirSync10(confDir, {
426096
426192
  recursive: true
@@ -426124,11 +426220,11 @@ ${content}`;
426124
426220
  };
426125
426221
  }
426126
426222
  function findAlacrittyConfig() {
426127
- 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")];
426128
426224
  return paths.find((p2) => existsSync28(p2)) ?? null;
426129
426225
  }
426130
426226
  function setAlacrittyFont(family, size) {
426131
- const confDir = join36(homedir18(), ".config", "alacritty");
426227
+ const confDir = join36(homedir19(), ".config", "alacritty");
426132
426228
  let conf = findAlacrittyConfig();
426133
426229
  if (!conf) {
426134
426230
  conf = join36(confDir, "alacritty.toml");
@@ -426239,7 +426335,7 @@ function setTerminalAppFont(family, size) {
426239
426335
  }
426240
426336
  }
426241
426337
  function setGhosttyFont(family, size) {
426242
- const confDir = join36(homedir18(), ".config", "ghostty");
426338
+ const confDir = join36(homedir19(), ".config", "ghostty");
426243
426339
  const conf = join36(confDir, "config");
426244
426340
  mkdirSync10(confDir, {
426245
426341
  recursive: true
@@ -426265,7 +426361,7 @@ ${content}`;
426265
426361
  };
426266
426362
  }
426267
426363
  function setFootFont(family, size) {
426268
- const confDir = join36(homedir18(), ".config", "foot");
426364
+ const confDir = join36(homedir19(), ".config", "foot");
426269
426365
  const conf = join36(confDir, "foot.ini");
426270
426366
  mkdirSync10(confDir, {
426271
426367
  recursive: true
@@ -427960,10 +428056,10 @@ function getPerPidRssKB(pids) {
427960
428056
  if (pids.length === 0)
427961
428057
  return Promise.resolve(result);
427962
428058
  if (process.platform === "win32") {
427963
- return new Promise((resolve33) => {
428059
+ return new Promise((resolve34) => {
427964
428060
  execFile3("wmic", ["process", "where", `(${pids.map((p2) => `ProcessId=${String(p2)}`).join(" or ")})`, "get", "ProcessId,WorkingSetSize", "/format:csv"], (err2, stdout) => {
427965
428061
  if (err2) {
427966
- resolve33(result);
428062
+ resolve34(result);
427967
428063
  return;
427968
428064
  }
427969
428065
  for (const line2 of stdout.split(`
@@ -427979,14 +428075,14 @@ function getPerPidRssKB(pids) {
427979
428075
  }
427980
428076
  }
427981
428077
  }
427982
- resolve33(result);
428078
+ resolve34(result);
427983
428079
  });
427984
428080
  });
427985
428081
  }
427986
- return new Promise((resolve33) => {
428082
+ return new Promise((resolve34) => {
427987
428083
  execFile3("ps", ["-p", pids.join(","), "-o", "pid=,rss="], (err2, stdout) => {
427988
428084
  if (err2) {
427989
- resolve33(result);
428085
+ resolve34(result);
427990
428086
  return;
427991
428087
  }
427992
428088
  for (const line2 of stdout.split(`
@@ -428005,7 +428101,7 @@ function getPerPidRssKB(pids) {
428005
428101
  }
428006
428102
  }
428007
428103
  }
428008
- resolve33(result);
428104
+ resolve34(result);
428009
428105
  });
428010
428106
  });
428011
428107
  }
@@ -428376,7 +428472,7 @@ __export(exports_prerequisites, {
428376
428472
  });
428377
428473
  import { execSync as execSync7 } from "child_process";
428378
428474
  import { existsSync as existsSync29 } from "fs";
428379
- import { homedir as homedir19, platform as platform2 } from "os";
428475
+ import { homedir as homedir20, platform as platform2 } from "os";
428380
428476
  import { join as join37 } from "path";
428381
428477
  function commandExists3(cmd) {
428382
428478
  try {
@@ -428422,7 +428518,7 @@ function getMissingRequired() {
428422
428518
  var MASON_BIN, PREREQUISITES;
428423
428519
  var init_prerequisites = __esm(() => {
428424
428520
  init_install();
428425
- MASON_BIN = join37(homedir19(), ".local", "share", "nvim", "mason", "bin");
428521
+ MASON_BIN = join37(homedir20(), ".local", "share", "nvim", "mason", "bin");
428426
428522
  PREREQUISITES = [{
428427
428523
  name: "Neovim",
428428
428524
  description: "Embedded editor (required, v0.11+)",
@@ -432059,7 +432155,7 @@ var init_registry = __esm(() => {
432059
432155
  // src/core/terminal/suspend.ts
432060
432156
  import { spawn as spawn11 } from "child_process";
432061
432157
  function suspendAndRun(opts) {
432062
- return new Promise((resolve33) => {
432158
+ return new Promise((resolve34) => {
432063
432159
  if (process.stdin.isTTY) {
432064
432160
  process.stdin.setRawMode(false);
432065
432161
  }
@@ -432081,7 +432177,7 @@ function suspendAndRun(opts) {
432081
432177
  process.stdin.setRawMode(true);
432082
432178
  process.stdin.resume();
432083
432179
  }
432084
- resolve33({
432180
+ resolve34({
432085
432181
  exitCode: code
432086
432182
  });
432087
432183
  });
@@ -432093,7 +432189,7 @@ function suspendAndRun(opts) {
432093
432189
  process.stdin.setRawMode(true);
432094
432190
  process.stdin.resume();
432095
432191
  }
432096
- resolve33({
432192
+ resolve34({
432097
432193
  exitCode: null
432098
432194
  });
432099
432195
  });
@@ -438247,7 +438343,7 @@ INCLUDE the plan progress above VERBATIM in ## Current State so the agent knows
438247
438343
  const result = mutexRef.current.then(() => {
438248
438344
  if (autoApproveRef.current)
438249
438345
  return true;
438250
- return new Promise((resolve33) => {
438346
+ return new Promise((resolve34) => {
438251
438347
  setPendingQuestion({
438252
438348
  id: crypto.randomUUID(),
438253
438349
  question: questionFn(...args2),
@@ -438267,7 +438363,7 @@ INCLUDE the plan progress above VERBATIM in ## Current State so the agent knows
438267
438363
  const allowed = answer === "allow" || answer === "always";
438268
438364
  if (answer === "always")
438269
438365
  autoApproveRef.current = true;
438270
- resolve33(allowed);
438366
+ resolve34(allowed);
438271
438367
  }
438272
438368
  });
438273
438369
  });
@@ -438283,7 +438379,7 @@ ${label}`), []);
438283
438379
 
438284
438380
  ${path6}`), []);
438285
438381
  const promptDestructive = import_react32.useCallback((description) => {
438286
- return new Promise((resolve33) => {
438382
+ return new Promise((resolve34) => {
438287
438383
  setPendingQuestion({
438288
438384
  id: crypto.randomUUID(),
438289
438385
  question: `\u26A0 Potentially destructive action:
@@ -438299,7 +438395,7 @@ ${description}`,
438299
438395
  allowSkip: false,
438300
438396
  resolve: (answer) => {
438301
438397
  setPendingQuestion(null);
438302
- resolve33(answer === "allow");
438398
+ resolve34(answer === "allow");
438303
438399
  }
438304
438400
  });
438305
438401
  });
@@ -438330,7 +438426,7 @@ ${description}`,
438330
438426
  setSidebarPlan(updater);
438331
438427
  },
438332
438428
  onPlanReview: (plan, planFile, planContent) => {
438333
- return new Promise((resolve33) => {
438429
+ return new Promise((resolve34) => {
438334
438430
  setPendingPlanReview({
438335
438431
  plan,
438336
438432
  planFile,
@@ -438362,14 +438458,14 @@ ${description}`,
438362
438458
  reviseFeedback: action
438363
438459
  };
438364
438460
  }
438365
- resolve33(action);
438461
+ resolve34(action);
438366
438462
  abortRef.current?.abort();
438367
438463
  }
438368
438464
  });
438369
438465
  });
438370
438466
  },
438371
438467
  onAskUser: (question, options, allowSkip) => {
438372
- return new Promise((resolve33) => {
438468
+ return new Promise((resolve34) => {
438373
438469
  setPendingQuestion({
438374
438470
  id: crypto.randomUUID(),
438375
438471
  question,
@@ -438377,7 +438473,7 @@ ${description}`,
438377
438473
  allowSkip,
438378
438474
  resolve: (answer) => {
438379
438475
  setPendingQuestion(null);
438380
- resolve33(answer);
438476
+ resolve34(answer);
438381
438477
  }
438382
438478
  });
438383
438479
  });
@@ -438751,8 +438847,8 @@ ${description}`,
438751
438847
  content: `Retry ${String(retry + 1)}/${String(MAX_TRANSIENT_RETRIES)}: ${msg} [delay:${String(delaySec)}s]`,
438752
438848
  timestamp: Date.now()
438753
438849
  }]);
438754
- await new Promise((resolve33, reject) => {
438755
- const timer = setTimeout(resolve33, delay2);
438850
+ await new Promise((resolve34, reject) => {
438851
+ const timer = setTimeout(resolve34, delay2);
438756
438852
  const onAbort = () => {
438757
438853
  clearTimeout(timer);
438758
438854
  reject(new Error("aborted"));
@@ -439806,7 +439902,7 @@ function fuzzyFilter(pattern, entries2, limit = 50) {
439806
439902
  }
439807
439903
 
439808
439904
  // src/components/chat/InputBox.tsx
439809
- import { homedir as homedir20 } from "os";
439905
+ import { homedir as homedir21 } from "os";
439810
439906
  import { join as join41 } from "path";
439811
439907
  function getCommands() {
439812
439908
  if (!_commands) {
@@ -439960,7 +440056,7 @@ var init_InputBox = __esm(async () => {
439960
440056
  const historyStash = import_react34.useRef("");
439961
440057
  const getHistoryDB = import_react34.useCallback(() => {
439962
440058
  if (!historyDBRef.current) {
439963
- historyDBRef.current = new HistoryDB(join41(homedir20(), ".soulforge", "history.db"));
440059
+ historyDBRef.current = new HistoryDB(join41(homedir21(), ".soulforge", "history.db"));
439964
440060
  }
439965
440061
  return historyDBRef.current;
439966
440062
  }, []);
@@ -440566,8 +440662,8 @@ var init_InputBox = __esm(async () => {
440566
440662
 
440567
440663
  // src/core/utils/syntax.ts
440568
440664
  import { existsSync as existsSync32, readdirSync as readdirSync8 } from "fs";
440569
- import { homedir as homedir21 } from "os";
440570
- 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";
440571
440667
  function discoverParsers() {
440572
440668
  const parsers = [];
440573
440669
  let dirs;
@@ -440579,13 +440675,13 @@ function discoverParsers() {
440579
440675
  return parsers;
440580
440676
  }
440581
440677
  for (const dir of dirs) {
440582
- const langDir = resolve33(coreAssetsDir, dir);
440678
+ const langDir = resolve34(coreAssetsDir, dir);
440583
440679
  const wasmFiles = readdirSync8(langDir).filter((f3) => f3.endsWith(".wasm"));
440584
440680
  const wasmFile = wasmFiles[0];
440585
440681
  if (!wasmFile)
440586
440682
  continue;
440587
- const highlights = resolve33(langDir, "highlights.scm");
440588
- const injections = resolve33(langDir, "injections.scm");
440683
+ const highlights = resolve34(langDir, "highlights.scm");
440684
+ const injections = resolve34(langDir, "injections.scm");
440589
440685
  const hasHighlights = existsSync32(highlights);
440590
440686
  const hasInjections = existsSync32(injections);
440591
440687
  if (!hasHighlights)
@@ -440598,7 +440694,7 @@ function discoverParsers() {
440598
440694
  injections: [injections]
440599
440695
  } : {}
440600
440696
  },
440601
- wasm: resolve33(langDir, wasmFile),
440697
+ wasm: resolve34(langDir, wasmFile),
440602
440698
  ...TS_ALIASES[dir] ? {
440603
440699
  aliases: TS_ALIASES[dir]
440604
440700
  } : {},
@@ -440615,7 +440711,7 @@ function discoverParsers() {
440615
440711
  queries: {
440616
440712
  highlights: [highlights]
440617
440713
  },
440618
- wasm: resolve33(langDir, wasmFile)
440714
+ wasm: resolve34(langDir, wasmFile)
440619
440715
  });
440620
440716
  }
440621
440717
  }
@@ -440639,7 +440735,7 @@ var init_syntax = __esm(async () => {
440639
440735
  await init_core4();
440640
440736
  IS_COMPILED3 = import.meta.url.includes("$bunfs");
440641
440737
  IS_DIST3 = !IS_COMPILED3 && import.meta.dir.includes("/dist");
440642
- bundledAssets = join42(homedir21(), ".soulforge", "opentui-assets");
440738
+ bundledAssets = join42(homedir22(), ".soulforge", "opentui-assets");
440643
440739
  distAssets = join42(import.meta.dir, "opentui-assets");
440644
440740
  if (IS_COMPILED3) {
440645
440741
  coreAssetsDir = bundledAssets;
@@ -440647,7 +440743,7 @@ var init_syntax = __esm(async () => {
440647
440743
  coreAssetsDir = existsSync32(distAssets) ? distAssets : bundledAssets;
440648
440744
  } else {
440649
440745
  try {
440650
- coreAssetsDir = resolve33(dirname16(__require.resolve("@opentui/core")), "assets");
440746
+ coreAssetsDir = resolve34(dirname16(__require.resolve("@opentui/core")), "assets");
440651
440747
  } catch {
440652
440748
  coreAssetsDir = bundledAssets;
440653
440749
  }
@@ -440706,10 +440802,10 @@ var init_syntax = __esm(async () => {
440706
440802
  };
440707
440803
  addDefaultParsers(discoverParsers());
440708
440804
  if (IS_COMPILED3) {
440709
- 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");
440710
440806
  } else if (IS_DIST3) {
440711
440807
  try {
440712
- const coreWorker = resolve33(dirname16(__require.resolve("@opentui/core")), "parser.worker.js");
440808
+ const coreWorker = resolve34(dirname16(__require.resolve("@opentui/core")), "parser.worker.js");
440713
440809
  if (existsSync32(coreWorker)) {
440714
440810
  process.env.OTUI_TREE_SITTER_WORKER_PATH = coreWorker;
440715
440811
  }
@@ -444591,7 +444687,7 @@ var init_ToolCallDisplay = __esm(async () => {
444591
444687
  });
444592
444688
 
444593
444689
  // src/components/chat/tool-formatters.ts
444594
- import { resolve as resolve34 } from "path";
444690
+ import { resolve as resolve35 } from "path";
444595
444691
  function formatArgs(toolName, args2) {
444596
444692
  if (!args2)
444597
444693
  return "";
@@ -444993,7 +445089,7 @@ function detectOutsideCwd(toolName, args2) {
444993
445089
  const parsed = JSON.parse(args2);
444994
445090
  for (const val of Object.values(parsed)) {
444995
445091
  if (typeof val === "string" && (val.startsWith("/") || val.startsWith("~"))) {
444996
- const resolved = resolve34(val);
445092
+ const resolved = resolve35(val);
444997
445093
  const kind = classifyPath(resolved, CWD);
444998
445094
  if (kind)
444999
445095
  return kind;
@@ -471690,7 +471786,7 @@ var init_EditorSettings = __esm(async () => {
471690
471786
  // src/core/intelligence/backends/lsp/installer.ts
471691
471787
  import { execSync as execSync8, spawn as spawn14 } from "child_process";
471692
471788
  import { chmodSync as chmodSync4, existsSync as existsSync33, mkdirSync as mkdirSync13, readFileSync as readFileSync15, unlinkSync as unlinkSync3, writeFileSync as writeFileSync10 } from "fs";
471693
- import { homedir as homedir22 } from "os";
471789
+ import { homedir as homedir23 } from "os";
471694
471790
  import { join as join45 } from "path";
471695
471791
  function parsePurl(id) {
471696
471792
  const match2 = id.match(/^pkg:(\w+)\/(.+?)@(.+)$/);
@@ -471764,7 +471860,7 @@ function loadRegistry() {
471764
471860
  return [];
471765
471861
  }
471766
471862
  async function downloadRegistry() {
471767
- mkdirSync13(join45(homedir22(), ".soulforge"), {
471863
+ mkdirSync13(join45(homedir23(), ".soulforge"), {
471768
471864
  recursive: true
471769
471865
  });
471770
471866
  try {
@@ -471784,17 +471880,17 @@ async function downloadRegistry() {
471784
471880
  if (!zipResp.ok)
471785
471881
  throw new Error(`Download HTTP ${String(zipResp.status)}`);
471786
471882
  const zipBuf = await zipResp.arrayBuffer();
471787
- const tmpZip = join45(homedir22(), ".soulforge", "mason-registry.zip");
471883
+ const tmpZip = join45(homedir23(), ".soulforge", "mason-registry.zip");
471788
471884
  writeFileSync10(tmpZip, Buffer.from(zipBuf));
471789
471885
  const {
471790
471886
  execSync: execSync9
471791
471887
  } = await import("child_process");
471792
- execSync9(`unzip -qo "${tmpZip}" registry.json -d "${join45(homedir22(), ".soulforge")}"`, {
471888
+ execSync9(`unzip -qo "${tmpZip}" registry.json -d "${join45(homedir23(), ".soulforge")}"`, {
471793
471889
  stdio: "ignore",
471794
471890
  timeout: 1e4
471795
471891
  });
471796
471892
  unlinkSync3(tmpZip);
471797
- const jsonPath = join45(homedir22(), ".soulforge", "registry.json");
471893
+ const jsonPath = join45(homedir23(), ".soulforge", "registry.json");
471798
471894
  const text3 = readFileSync15(jsonPath, "utf-8");
471799
471895
  writeFileSync10(REGISTRY_CACHE, text3);
471800
471896
  unlinkSync3(jsonPath);
@@ -471941,7 +472037,7 @@ async function installPackage(pkg, onProgress) {
471941
472037
  });
471942
472038
  return "bun";
471943
472039
  } catch {
471944
- const sfBin = join45(homedir22(), ".soulforge", "bin", "bun");
472040
+ const sfBin = join45(homedir23(), ".soulforge", "bin", "bun");
471945
472041
  if (existsSync33(sfBin))
471946
472042
  return sfBin;
471947
472043
  return "bun";
@@ -472191,7 +472287,7 @@ function resolveAssetTemplate(template, version2) {
472191
472287
  return template.replace(/\{\{\s*version\s*\}\}/g, version2).replace(/\{\{\s*version\s*\|\s*strip_prefix\s*"v"\s*\}\}/g, version2.replace(/^v/, ""));
472192
472288
  }
472193
472289
  function runCommand(cmd, args2, log, extraEnv) {
472194
- return new Promise((resolve35, reject) => {
472290
+ return new Promise((resolve36, reject) => {
472195
472291
  const proc = spawn14(cmd, args2, {
472196
472292
  stdio: ["ignore", "pipe", "pipe"],
472197
472293
  env: {
@@ -472210,7 +472306,7 @@ function runCommand(cmd, args2, log, extraEnv) {
472210
472306
  });
472211
472307
  proc.on("close", (code) => {
472212
472308
  if (code === 0) {
472213
- resolve35();
472309
+ resolve36();
472214
472310
  } else {
472215
472311
  reject(new Error(`${cmd} exited with code ${String(code)}: ${stderr.slice(0, 500).trim()}`));
472216
472312
  }
@@ -472222,10 +472318,10 @@ function runCommand(cmd, args2, log, extraEnv) {
472222
472318
  }
472223
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;
472224
472320
  var init_installer = __esm(() => {
472225
- SOULFORGE_LSP_DIR = join45(homedir22(), ".soulforge", "lsp-servers");
472226
- MASON_REGISTRY_LOCAL = join45(homedir22(), ".local", "share", "nvim", "mason", "registries", "github", "mason-org", "mason-registry", "registry.json");
472227
- REGISTRY_CACHE = join45(homedir22(), ".soulforge", "mason-registry.json");
472228
- 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");
472229
472325
  pathCache = new Map;
472230
472326
  PROJECT_INDICATORS = {
472231
472327
  TypeScript: ["tsconfig.json", "*.ts", "*.tsx"],
@@ -477793,7 +477889,7 @@ init_theme();
477793
477889
  init_splash();
477794
477890
  init_errors();
477795
477891
  import { existsSync as existsSync36, readFileSync as readFileSync16 } from "fs";
477796
- import { homedir as homedir23 } from "os";
477892
+ import { homedir as homedir24 } from "os";
477797
477893
  import { join as join49 } from "path";
477798
477894
  globalThis.AI_SDK_LOG_WARNINGS = false;
477799
477895
  var cliArgs = process.argv.slice(2);
@@ -477810,7 +477906,7 @@ if (hasCli) {
477810
477906
  }
477811
477907
  var isCompiledBinary = import.meta.url.includes("$bunfs");
477812
477908
  if (isCompiledBinary) {
477813
- const bundledWorker = join49(homedir23(), ".soulforge", "opentui-assets", "parser.worker.js");
477909
+ const bundledWorker = join49(homedir24(), ".soulforge", "opentui-assets", "parser.worker.js");
477814
477910
  if (!process.env.OTUI_TREE_SITTER_WORKER_PATH && existsSync36(bundledWorker)) {
477815
477911
  process.env.OTUI_TREE_SITTER_WORKER_PATH = bundledWorker;
477816
477912
  }
@@ -477827,7 +477923,7 @@ function rgb(hex3) {
477827
477923
  return `\x1B[38;2;${n >> 16 & 255};${n >> 8 & 255};${n & 255}m`;
477828
477924
  }
477829
477925
  try {
477830
- const raw2 = readFileSync16(join49(homedir23(), ".soulforge", "config.json"), "utf-8");
477926
+ const raw2 = readFileSync16(join49(homedir24(), ".soulforge", "config.json"), "utf-8");
477831
477927
  const cfg = JSON.parse(raw2);
477832
477928
  if (cfg.theme?.name)
477833
477929
  applyTheme(cfg.theme.name, cfg.theme?.transparent, {
@@ -477848,7 +477944,7 @@ var cols = process.stdout.columns ?? 80;
477848
477944
  var rows = process.stdout.rows ?? 24;
477849
477945
  var GHOST = (() => {
477850
477946
  try {
477851
- const raw2 = readFileSync16(join49(homedir23(), ".soulforge", "config.json"), "utf-8");
477947
+ const raw2 = readFileSync16(join49(homedir24(), ".soulforge", "config.json"), "utf-8");
477852
477948
  const cfg = JSON.parse(raw2);
477853
477949
  if (cfg.nerdFont === true)
477854
477950
  return "\uDB80\uDEA0";