exoproc 0.6.4 → 0.6.7

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.
Files changed (39) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +212 -116
  4. package/dist/commands/compile.js +0 -1
  5. package/dist/commands/exec.js +0 -1
  6. package/dist/commands/ps.js +0 -1
  7. package/dist/commands/run.js +0 -1
  8. package/dist/commands/screenshot.js +0 -1
  9. package/dist/commands/windows.js +0 -1
  10. package/dist/doctor/index.js +0 -1
  11. package/dist/index.js +173 -157
  12. package/dist/setup/clients.d.ts.map +1 -1
  13. package/dist/setup/clients.js +7 -13
  14. package/dist/setup/config-writer.d.ts.map +1 -1
  15. package/dist/setup/config-writer.js +19 -11
  16. package/dist/setup/index.d.ts.map +1 -1
  17. package/dist/setup/index.js +40 -24
  18. package/dist/setup/skill-installer.js +0 -1
  19. package/dist/setup/types.js +0 -1
  20. package/package.json +2 -2
  21. package/dist/capstone.dll +0 -0
  22. package/dist/cli.js.map +0 -1
  23. package/dist/commands/compile.js.map +0 -1
  24. package/dist/commands/exec.js.map +0 -1
  25. package/dist/commands/ps.js.map +0 -1
  26. package/dist/commands/run.js.map +0 -1
  27. package/dist/commands/screenshot.js.map +0 -1
  28. package/dist/commands/windows.js.map +0 -1
  29. package/dist/deps/capstone.dll +0 -0
  30. package/dist/deps/ecj-3.26.0.jar +0 -0
  31. package/dist/deps/ecj-3.46.100.jar +0 -0
  32. package/dist/deps/tiny-remapper-0.14.1-fat.jar +0 -0
  33. package/dist/doctor/index.js.map +0 -1
  34. package/dist/index.js.map +0 -1
  35. package/dist/setup/clients.js.map +0 -1
  36. package/dist/setup/config-writer.js.map +0 -1
  37. package/dist/setup/index.js.map +0 -1
  38. package/dist/setup/skill-installer.js.map +0 -1
  39. package/dist/setup/types.js.map +0 -1
package/dist/cli.js CHANGED
@@ -85287,7 +85287,7 @@ var package_default2;
85287
85287
  var init_package = __esm(() => {
85288
85288
  package_default2 = {
85289
85289
  name: "exoproc-mcp",
85290
- version: "0.6.4",
85290
+ version: "0.6.5",
85291
85291
  description: "Dedicated Model Context Protocol (MCP) server for native Windows x64 reverse engineering, thread hijacking, function hooking, memory inspection, and JVM analysis.",
85292
85292
  main: "./dist/index.js",
85293
85293
  bin: {
@@ -90903,7 +90903,7 @@ var init_cgenerator = __esm(() => {
90903
90903
 
90904
90904
  // packages/xffi/dist/cjit.js
90905
90905
  import { cc as cc2, toArrayBuffer as toArrayBuffer2 } from "bun:ffi";
90906
- import { writeFileSync as writeFileSync4, readFileSync as readFileSync4, existsSync as existsSync6, unlinkSync as unlinkSync2 } from "fs";
90906
+ import { writeFileSync as writeFileSync4, readFileSync as readFileSync4, existsSync as existsSync7, unlinkSync as unlinkSync2 } from "fs";
90907
90907
  import { join as join7 } from "path";
90908
90908
  import { tmpdir as tmpdir3 } from "os";
90909
90909
  import { randomBytes as randomBytes3 } from "crypto";
@@ -91016,7 +91016,7 @@ function cjitopen(symbols, options) {
91016
91016
  });
91017
91017
  const sharedHash = Bun.hash(sharedHeaderContent).toString(16);
91018
91018
  const sharedHeaderFile = join7(tmpdir3(), `xffi-shared-header-${sharedHash}.h`);
91019
- if (!existsSync6(sharedHeaderFile)) {
91019
+ if (!existsSync7(sharedHeaderFile)) {
91020
91020
  try {
91021
91021
  writeFileSync4(sharedHeaderFile, sharedHeaderContent, "utf8");
91022
91022
  } catch {}
@@ -91038,7 +91038,7 @@ function cjitopen(symbols, options) {
91038
91038
  const ccSymbols = {};
91039
91039
  const hash = Bun.hash(headerSource).toString(16);
91040
91040
  const headerFile = join7(tmpdir3(), `xffi-jit-header-${hash}.h`);
91041
- if (!existsSync6(headerFile)) {
91041
+ if (!existsSync7(headerFile)) {
91042
91042
  try {
91043
91043
  writeFileSync4(headerFile, headerSource, "utf8");
91044
91044
  } catch {}
@@ -92533,7 +92533,7 @@ var init_logger = __esm(() => {
92533
92533
  });
92534
92534
 
92535
92535
  // packages/utils/dist/cache.js
92536
- import { existsSync as existsSync7, mkdirSync as mkdirSync5, rmSync as rmSync2 } from "fs";
92536
+ import { existsSync as existsSync8, mkdirSync as mkdirSync5, rmSync as rmSync2 } from "fs";
92537
92537
  import { tmpdir as tmpdir4 } from "os";
92538
92538
  import { join as join8 } from "path";
92539
92539
  function getCacheDir2(subpath) {
@@ -92560,7 +92560,7 @@ function getCacheDir2(subpath) {
92560
92560
  }
92561
92561
  }
92562
92562
  const finalDir = subpath ? join8(baseDir, subpath) : baseDir;
92563
- if (!existsSync7(finalDir)) {
92563
+ if (!existsSync8(finalDir)) {
92564
92564
  try {
92565
92565
  mkdirSync5(finalDir, { recursive: true });
92566
92566
  } catch {}
@@ -92573,9 +92573,9 @@ function getAgentCacheDir() {
92573
92573
  var init_cache = () => {};
92574
92574
 
92575
92575
  // packages/utils/dist/downloader.js
92576
- import { createWriteStream as createWriteStream2, mkdirSync as mkdirSync6, createReadStream as createReadStream2, existsSync as existsSync8, readFileSync as readFileSync5, readdirSync as readdirSync2, statSync as statSync2, copyFileSync as copyFileSync3 } from "fs";
92576
+ import { createWriteStream as createWriteStream2, mkdirSync as mkdirSync6, createReadStream as createReadStream2, existsSync as existsSync9, readFileSync as readFileSync5, readdirSync as readdirSync2, statSync as statSync2, copyFileSync as copyFileSync3 } from "fs";
92577
92577
  import { rmSync as rmSync3 } from "fs";
92578
- import { join as join9, dirname as dirname5, basename as basename2, resolve as resolve2, isAbsolute as isAbsolute2 } from "path";
92578
+ import { join as join9, dirname as dirname5, basename as basename3, resolve as resolve2, isAbsolute as isAbsolute2 } from "path";
92579
92579
  import { tmpdir as tmpdir5 } from "os";
92580
92580
  import { randomBytes as randomBytes4, createHash as createHash2 } from "crypto";
92581
92581
  import { execSync } from "child_process";
@@ -92587,7 +92587,7 @@ function computeHash2(filePath, algorithm = "sha1") {
92587
92587
  return createHash2(algorithm).update(fileBuffer).digest("hex");
92588
92588
  }
92589
92589
  function verifyChecksum(filePath, dep) {
92590
- if (!existsSync8(filePath))
92590
+ if (!existsSync9(filePath))
92591
92591
  return false;
92592
92592
  try {
92593
92593
  if (dep.sha1) {
@@ -92615,7 +92615,7 @@ function downloadFileSync(url, destPath) {
92615
92615
  stdio: ["ignore", "pipe", "pipe"],
92616
92616
  timeout: 120000
92617
92617
  });
92618
- if (existsSync8(destPath) && statSync2(destPath).size > 0) {
92618
+ if (existsSync9(destPath) && statSync2(destPath).size > 0) {
92619
92619
  return;
92620
92620
  }
92621
92621
  } catch {
@@ -92624,7 +92624,7 @@ function downloadFileSync(url, destPath) {
92624
92624
  stdio: ["ignore", "pipe", "pipe"],
92625
92625
  timeout: 120000
92626
92626
  });
92627
- if (existsSync8(destPath) && statSync2(destPath).size > 0) {
92627
+ if (existsSync9(destPath) && statSync2(destPath).size > 0) {
92628
92628
  return;
92629
92629
  }
92630
92630
  }
@@ -92654,7 +92654,7 @@ function extractEntryFromZipSync(zipPath, destFile, entryName) {
92654
92654
  execSync(`unzip -p "${zipPath}" "*${entryName}" > "${destFile}"`, {
92655
92655
  stdio: ["ignore", "pipe", "pipe"]
92656
92656
  });
92657
- if (existsSync8(destFile) && statSync2(destFile).size > 0)
92657
+ if (existsSync9(destFile) && statSync2(destFile).size > 0)
92658
92658
  return;
92659
92659
  } catch {}
92660
92660
  const pyScript = `
@@ -92687,7 +92687,7 @@ function findFileRecursive(dir, targetName) {
92687
92687
  return null;
92688
92688
  }
92689
92689
  function resolveDepPath(dep, packageDir) {
92690
- const filename = basename2(dep.target);
92690
+ const filename = basename3(dep.target);
92691
92691
  if (packageDir) {
92692
92692
  const localTarget = isAbsolute2(dep.target) ? dep.target : resolve2(packageDir, dep.target);
92693
92693
  if (verifyChecksum(localTarget, dep)) {
@@ -92716,7 +92716,7 @@ function resolveOrDownloadDepSync(dep, packageDir, options = {}) {
92716
92716
  return existing;
92717
92717
  }
92718
92718
  }
92719
- const filename = basename2(dep.target);
92719
+ const filename = basename3(dep.target);
92720
92720
  const cacheDest = join9(getDepsCacheDir2(), filename);
92721
92721
  const tempDir = join9(tmpdir5(), `exoproc-dep-sync-${randomBytes4(6).toString("hex")}`);
92722
92722
  mkdirSync6(tempDir, { recursive: true });
@@ -93128,7 +93128,7 @@ var init_debug_helper = __esm(() => {
93128
93128
  });
93129
93129
 
93130
93130
  // packages/xffi/dist/middleware-accessor.js
93131
- import { writeFileSync as writeFileSync5, readFileSync as readFileSync6, existsSync as existsSync9, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3, openSync, closeSync, statSync as statSync3 } from "fs";
93131
+ import { writeFileSync as writeFileSync5, readFileSync as readFileSync6, existsSync as existsSync10, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3, openSync, closeSync, statSync as statSync3 } from "fs";
93132
93132
  import { resolve as resolve3, dirname as dirname6 } from "path";
93133
93133
  function runInCall(fn) {
93134
93134
  const ctx = getActiveContext();
@@ -93146,7 +93146,7 @@ function isInittableAccessor(obj2) {
93146
93146
  function withFileLockSync(filePath, fn, timeoutMs = 5000) {
93147
93147
  const absTarget = resolve3(filePath);
93148
93148
  const dir = dirname6(absTarget);
93149
- if (!existsSync9(dir)) {
93149
+ if (!existsSync10(dir)) {
93150
93150
  mkdirSync7(dir, { recursive: true });
93151
93151
  }
93152
93152
  const lockPath = `${absTarget}.lock`;
@@ -93187,7 +93187,7 @@ function withFileLockSync(filePath, fn, timeoutMs = 5000) {
93187
93187
  } catch {}
93188
93188
  }
93189
93189
  try {
93190
- if (existsSync9(lockPath)) {
93190
+ if (existsSync10(lockPath)) {
93191
93191
  unlinkSync3(lockPath);
93192
93192
  }
93193
93193
  } catch {}
@@ -93196,7 +93196,7 @@ function withFileLockSync(filePath, fn, timeoutMs = 5000) {
93196
93196
  async function withFileLock(filePath, fn, timeoutMs = 5000) {
93197
93197
  const absTarget = resolve3(filePath);
93198
93198
  const dir = dirname6(absTarget);
93199
- if (!existsSync9(dir)) {
93199
+ if (!existsSync10(dir)) {
93200
93200
  mkdirSync7(dir, { recursive: true });
93201
93201
  }
93202
93202
  const lockPath = `${absTarget}.lock`;
@@ -93236,7 +93236,7 @@ async function withFileLock(filePath, fn, timeoutMs = 5000) {
93236
93236
  } catch {}
93237
93237
  }
93238
93238
  try {
93239
- if (existsSync9(lockPath)) {
93239
+ if (existsSync10(lockPath)) {
93240
93240
  unlinkSync3(lockPath);
93241
93241
  }
93242
93242
  } catch {}
@@ -93835,7 +93835,7 @@ var init_middleware_accessor = __esm(() => {
93835
93835
  const session = this.toJSON();
93836
93836
  withFileLockSync(absPath, () => {
93837
93837
  const dir = dirname6(absPath);
93838
- if (!existsSync9(dir)) {
93838
+ if (!existsSync10(dir)) {
93839
93839
  mkdirSync7(dir, { recursive: true });
93840
93840
  }
93841
93841
  writeFileSync5(absPath, JSON.stringify(session, null, 2), "utf8");
@@ -93854,7 +93854,7 @@ var init_middleware_accessor = __esm(() => {
93854
93854
  const session = this.toJSON();
93855
93855
  await withFileLock(absPath, async () => {
93856
93856
  const dir = dirname6(absPath);
93857
- if (!existsSync9(dir)) {
93857
+ if (!existsSync10(dir)) {
93858
93858
  mkdirSync7(dir, { recursive: true });
93859
93859
  }
93860
93860
  writeFileSync5(absPath, JSON.stringify(session, null, 2), "utf8");
@@ -93872,7 +93872,7 @@ var init_middleware_accessor = __esm(() => {
93872
93872
  static loadSession(filePath) {
93873
93873
  const absPath = resolve3(filePath);
93874
93874
  return withFileLockSync(absPath, () => {
93875
- if (!existsSync9(absPath)) {
93875
+ if (!existsSync10(absPath)) {
93876
93876
  throw new Error(`HostAccessor session file not found: ${absPath}`);
93877
93877
  }
93878
93878
  const raw = readFileSync6(absPath, "utf8");
@@ -93892,7 +93892,7 @@ var init_middleware_accessor = __esm(() => {
93892
93892
  const shouldConsume = overrideOptions?.consume !== false;
93893
93893
  let session;
93894
93894
  await withFileLock(absPath, async () => {
93895
- if (!existsSync9(absPath)) {
93895
+ if (!existsSync10(absPath)) {
93896
93896
  throw new Error(`HostAccessor session file not found: ${absPath}`);
93897
93897
  }
93898
93898
  const raw = readFileSync6(absPath, "utf8");
@@ -102100,7 +102100,7 @@ function parseClassBytecode(bytes) {
102100
102100
  }
102101
102101
 
102102
102102
  // packages/java/jjit/dist/remapper.js
102103
- import { copyFileSync as copyFileSync4, existsSync as existsSync10, mkdirSync as mkdirSync8, readFileSync as readFileSync7, rmSync as rmSync4, statSync as statSync4, writeFileSync as writeFileSync6 } from "fs";
102103
+ import { copyFileSync as copyFileSync4, existsSync as existsSync11, mkdirSync as mkdirSync8, readFileSync as readFileSync7, rmSync as rmSync4, statSync as statSync4, writeFileSync as writeFileSync6 } from "fs";
102104
102104
  import { spawnSync } from "child_process";
102105
102105
  import { tmpdir as tmpdir6 } from "os";
102106
102106
  import { join as join10, resolve as resolve4 } from "path";
@@ -102118,7 +102118,7 @@ function resolveTinyRemapperJarPath() {
102118
102118
  const jarName = "tiny-remapper-0.14.1-fat.jar";
102119
102119
  try {
102120
102120
  const cached = join10(getDepsCacheDir2(), jarName);
102121
- if (existsSync10(cached)) {
102121
+ if (existsSync11(cached)) {
102122
102122
  return resolve4(cached);
102123
102123
  }
102124
102124
  } catch {}
@@ -102139,7 +102139,7 @@ function resolveTinyRemapperJarPath() {
102139
102139
  ];
102140
102140
  for (const dir of candidateDirs) {
102141
102141
  const candidate = join10(dir, jarName);
102142
- if (existsSync10(candidate)) {
102142
+ if (existsSync11(candidate)) {
102143
102143
  return resolve4(candidate);
102144
102144
  }
102145
102145
  }
@@ -102355,7 +102355,7 @@ async function remapJava(options) {
102355
102355
  mkdirSync8(outDir, { recursive: true });
102356
102356
  try {
102357
102357
  if (typeof options.input === "string") {
102358
- if (existsSync10(options.input)) {
102358
+ if (existsSync11(options.input)) {
102359
102359
  const st = statSync4(options.input);
102360
102360
  if (st.isDirectory()) {
102361
102361
  inputDir = options.input;
@@ -102382,7 +102382,7 @@ async function remapJava(options) {
102382
102382
  }
102383
102383
  let mappingFile;
102384
102384
  let tinyContent = "";
102385
- if (typeof options.mappings === "string" && existsSync10(options.mappings)) {
102385
+ if (typeof options.mappings === "string" && existsSync11(options.mappings)) {
102386
102386
  mappingFile = options.mappings;
102387
102387
  try {
102388
102388
  tinyContent = readFileSync7(options.mappings, "utf8");
@@ -102419,7 +102419,7 @@ async function remapJava(options) {
102419
102419
  const stderr = await new Response(proc.stderr).text();
102420
102420
  const code = await proc.exited;
102421
102421
  const classes = new Map;
102422
- if (code === 0 && existsSync10(outDir)) {
102422
+ if (code === 0 && existsSync11(outDir)) {
102423
102423
  collectClassFilesSync(outDir, outDir, classes);
102424
102424
  }
102425
102425
  return {
@@ -102457,7 +102457,7 @@ function remapJavaSync(options) {
102457
102457
  mkdirSync8(outDir, { recursive: true });
102458
102458
  try {
102459
102459
  if (typeof options.input === "string") {
102460
- if (existsSync10(options.input)) {
102460
+ if (existsSync11(options.input)) {
102461
102461
  const st = statSync4(options.input);
102462
102462
  if (st.isDirectory()) {
102463
102463
  inputDir = options.input;
@@ -102484,7 +102484,7 @@ function remapJavaSync(options) {
102484
102484
  }
102485
102485
  let mappingFile;
102486
102486
  let tinyContent = "";
102487
- if (typeof options.mappings === "string" && existsSync10(options.mappings)) {
102487
+ if (typeof options.mappings === "string" && existsSync11(options.mappings)) {
102488
102488
  mappingFile = options.mappings;
102489
102489
  try {
102490
102490
  tinyContent = readFileSync7(options.mappings, "utf8");
@@ -102515,7 +102515,7 @@ function remapJavaSync(options) {
102515
102515
  const stdout = result.stdout || "";
102516
102516
  const stderr = result.stderr || "";
102517
102517
  const classes = new Map;
102518
- if (code === 0 && existsSync10(outDir)) {
102518
+ if (code === 0 && existsSync11(outDir)) {
102519
102519
  collectClassFilesSync(outDir, outDir, classes);
102520
102520
  }
102521
102521
  return {
@@ -102558,7 +102558,7 @@ function extractBytecodeList(input) {
102558
102558
  if (byteArrays.length > 0)
102559
102559
  return byteArrays;
102560
102560
  }
102561
- if (typeof input === "string" && existsSync10(input)) {
102561
+ if (typeof input === "string" && existsSync11(input)) {
102562
102562
  const stat = statSync4(input);
102563
102563
  if (stat.isDirectory()) {
102564
102564
  const map = new Map;
@@ -102689,7 +102689,7 @@ function obfuscateBytecodeSync(input, options = {}) {
102689
102689
  const mappings = generateObfuscationMappings(input, options);
102690
102690
  if (options.exportMappingsPath) {
102691
102691
  const parentDir = resolve4(options.exportMappingsPath, "..");
102692
- if (!existsSync10(parentDir)) {
102692
+ if (!existsSync11(parentDir)) {
102693
102693
  mkdirSync8(parentDir, { recursive: true });
102694
102694
  }
102695
102695
  const content = options.exportMappingsPath.endsWith(".txt") ? formatMappingsHumanReadable(mappings) : mappings;
@@ -102711,7 +102711,7 @@ async function obfuscateBytecode(input, options = {}) {
102711
102711
  const mappings = generateObfuscationMappings(input, options);
102712
102712
  if (options.exportMappingsPath) {
102713
102713
  const parentDir = resolve4(options.exportMappingsPath, "..");
102714
- if (!existsSync10(parentDir)) {
102714
+ if (!existsSync11(parentDir)) {
102715
102715
  mkdirSync8(parentDir, { recursive: true });
102716
102716
  }
102717
102717
  const content = options.exportMappingsPath.endsWith(".txt") ? formatMappingsHumanReadable(mappings) : mappings;
@@ -102815,14 +102815,14 @@ var init_remapper = __esm(() => {
102815
102815
  });
102816
102816
 
102817
102817
  // packages/java/jjit/dist/compiler.js
102818
- import { existsSync as existsSync11, mkdirSync as mkdirSync9, readdirSync as readdirSync3, readFileSync as readFileSync8, statSync as statSync5, writeFileSync as writeFileSync7 } from "fs";
102818
+ import { existsSync as existsSync12, mkdirSync as mkdirSync9, readdirSync as readdirSync3, readFileSync as readFileSync8, statSync as statSync5, writeFileSync as writeFileSync7 } from "fs";
102819
102819
  import { mkdtemp, readFile, rm } from "fs/promises";
102820
102820
  import { tmpdir as tmpdir7 } from "os";
102821
102821
  import { join as join11, resolve as resolve5, relative } from "path";
102822
102822
  function resolveDefaultJavaPath() {
102823
102823
  if (process.env.JAVA_HOME) {
102824
102824
  const bin = join11(process.env.JAVA_HOME, "bin", process.platform === "win32" ? "java.exe" : "java");
102825
- if (existsSync11(bin))
102825
+ if (existsSync12(bin))
102826
102826
  return bin;
102827
102827
  }
102828
102828
  return "java";
@@ -102832,7 +102832,7 @@ function resolveEcjJarPath(javaMajorVersion) {
102832
102832
  const baseDir = import.meta.dirname || import.meta.dir || process.cwd();
102833
102833
  try {
102834
102834
  const cached = join11(getDepsCacheDir2(), jarName);
102835
- if (existsSync11(cached)) {
102835
+ if (existsSync12(cached)) {
102836
102836
  return resolve5(cached);
102837
102837
  }
102838
102838
  } catch {}
@@ -102853,7 +102853,7 @@ function resolveEcjJarPath(javaMajorVersion) {
102853
102853
  ];
102854
102854
  for (const dir of candidateDirs) {
102855
102855
  const candidate = join11(dir, jarName);
102856
- if (existsSync11(candidate)) {
102856
+ if (existsSync12(candidate)) {
102857
102857
  return resolve5(candidate);
102858
102858
  }
102859
102859
  }
@@ -103114,7 +103114,7 @@ ${stderrText}`.trim();
103114
103114
  mappings: appliedMappings,
103115
103115
  readClasses: async () => {
103116
103116
  const map = new Map;
103117
- if (exitCode === 0 && existsSync11(outDir)) {
103117
+ if (exitCode === 0 && existsSync12(outDir)) {
103118
103118
  await collectClassFiles(outDir, outDir, map);
103119
103119
  }
103120
103120
  return map;
@@ -103124,7 +103124,7 @@ ${stderrText}`.trim();
103124
103124
  if (!targetName)
103125
103125
  return;
103126
103126
  const classPath = join11(outDir, ...targetName.split(".")) + ".class";
103127
- if (!existsSync11(classPath))
103127
+ if (!existsSync12(classPath))
103128
103128
  return;
103129
103129
  const bytes = await readFile(classPath);
103130
103130
  return new Uint8Array(bytes);
@@ -103132,7 +103132,7 @@ ${stderrText}`.trim();
103132
103132
  get classes() {
103133
103133
  if (!cachedClasses) {
103134
103134
  cachedClasses = new Map;
103135
- if (exitCode === 0 && existsSync11(outDir)) {
103135
+ if (exitCode === 0 && existsSync12(outDir)) {
103136
103136
  collectClassFilesSync(outDir, outDir, cachedClasses);
103137
103137
  }
103138
103138
  }
@@ -103302,7 +103302,7 @@ ${stderrText}`.trim();
103302
103302
  mappings: appliedMappings,
103303
103303
  readClasses: async () => {
103304
103304
  const map = new Map;
103305
- if (exitCode === 0 && existsSync11(outDir)) {
103305
+ if (exitCode === 0 && existsSync12(outDir)) {
103306
103306
  await collectClassFiles(outDir, outDir, map);
103307
103307
  }
103308
103308
  return map;
@@ -103312,7 +103312,7 @@ ${stderrText}`.trim();
103312
103312
  if (!targetName)
103313
103313
  return;
103314
103314
  const classPath = join11(outDir, ...targetName.split(".")) + ".class";
103315
- if (!existsSync11(classPath))
103315
+ if (!existsSync12(classPath))
103316
103316
  return;
103317
103317
  const bytes = await readFile(classPath);
103318
103318
  return new Uint8Array(bytes);
@@ -103320,7 +103320,7 @@ ${stderrText}`.trim();
103320
103320
  get classes() {
103321
103321
  if (!cachedClasses) {
103322
103322
  cachedClasses = new Map;
103323
- if (exitCode === 0 && existsSync11(outDir)) {
103323
+ if (exitCode === 0 && existsSync12(outDir)) {
103324
103324
  collectClassFilesSync(outDir, outDir, cachedClasses);
103325
103325
  }
103326
103326
  }
@@ -104455,7 +104455,7 @@ var init_jar2 = __esm(() => {
104455
104455
  });
104456
104456
 
104457
104457
  // packages/java/njava/dist/stubs/project.js
104458
- import { existsSync as existsSync12, mkdirSync as mkdirSync11, rmSync as rmSync5, writeFileSync as writeFileSync9 } from "fs";
104458
+ import { existsSync as existsSync13, mkdirSync as mkdirSync11, rmSync as rmSync5, writeFileSync as writeFileSync9 } from "fs";
104459
104459
  import { tmpdir as tmpdir8 } from "os";
104460
104460
  import { join as join12, resolve as resolve6 } from "path";
104461
104461
 
@@ -104712,7 +104712,7 @@ Created-By: Exoproc NJava Virtual Stubs\r
104712
104712
  return new Map(this.generatedFiles);
104713
104713
  }
104714
104714
  cleanup() {
104715
- if (existsSync12(this.workspaceDir)) {
104715
+ if (existsSync13(this.workspaceDir)) {
104716
104716
  try {
104717
104717
  rmSync5(this.workspaceDir, { recursive: true, force: true });
104718
104718
  } catch {}
@@ -104731,7 +104731,7 @@ var init_remapper2 = __esm(() => {
104731
104731
  });
104732
104732
 
104733
104733
  // packages/java/njava/dist/mapping.js
104734
- import { existsSync as existsSync13, readFileSync as readFileSync9 } from "fs";
104734
+ import { existsSync as existsSync14, readFileSync as readFileSync9 } from "fs";
104735
104735
  function isObfuscatedMethodName(methodName) {
104736
104736
  if (!methodName)
104737
104737
  return false;
@@ -105209,7 +105209,7 @@ class JavaMappingRegistry {
105209
105209
  return this;
105210
105210
  let content = tinyContentOrPath;
105211
105211
  if (typeof content === "string" && (content.includes("/") || content.includes("\\") || content.endsWith(".tiny") || content.endsWith(".txt"))) {
105212
- if (existsSync13(content)) {
105212
+ if (existsSync14(content)) {
105213
105213
  try {
105214
105214
  content = readFileSync9(content, "utf8");
105215
105215
  } catch {}
@@ -105274,7 +105274,7 @@ class JavaMappingRegistry {
105274
105274
  return this.load(parsed);
105275
105275
  } catch {}
105276
105276
  }
105277
- if (existsSync13(trimmed)) {
105277
+ if (existsSync14(trimmed)) {
105278
105278
  if (trimmed.endsWith(".tiny")) {
105279
105279
  return this.loadTiny(trimmed);
105280
105280
  }
@@ -106792,7 +106792,7 @@ var init_agent_sources = __esm(() => {
106792
106792
  });
106793
106793
 
106794
106794
  // packages/java/agent/dist/agent-builder.js
106795
- import { existsSync as existsSync14, readFileSync as readFileSync10, writeFileSync as writeFileSync10 } from "fs";
106795
+ import { existsSync as existsSync15, readFileSync as readFileSync10, writeFileSync as writeFileSync10 } from "fs";
106796
106796
  import { join as join13, resolve as resolve7 } from "path";
106797
106797
  function getAgentSources(options) {
106798
106798
  if (options?.buildId || options?.port !== undefined) {
@@ -106906,12 +106906,12 @@ async function getAgentJar(options = {}) {
106906
106906
  const portSuffix = options.port && options.port !== 43378 ? `-p${options.port}` : "";
106907
106907
  const targetJarPath = options.outputPath ?? resolve7(join13(cacheDir, options.obfuscate ? `njava-agent-java${javaVersion}${portSuffix}-obf.jar` : `njava-agent-java${javaVersion}${portSuffix}.jar`));
106908
106908
  const targetTinyPath = targetJarPath.replace(/\.jar$/, ".tiny");
106909
- if (!options.force && existsSync14(targetJarPath)) {
106909
+ if (!options.force && existsSync15(targetJarPath)) {
106910
106910
  try {
106911
106911
  const jarBuffer = readFileSync10(targetJarPath);
106912
106912
  if (jarBuffer.length > 500) {
106913
106913
  let mappings;
106914
- if (existsSync14(targetTinyPath)) {
106914
+ if (existsSync15(targetTinyPath)) {
106915
106915
  try {
106916
106916
  mappings = readFileSync10(targetTinyPath, "utf8");
106917
106917
  } catch {}
@@ -106988,7 +106988,7 @@ function loadAgentMappings(poolOrRegistry, sourceOrOptions = {}) {
106988
106988
  let mappings = "";
106989
106989
  const cacheDir = getDefaultAgentCacheDir();
106990
106990
  if (typeof sourceOrOptions === "string") {
106991
- if (existsSync14(sourceOrOptions)) {
106991
+ if (existsSync15(sourceOrOptions)) {
106992
106992
  try {
106993
106993
  mappings = readFileSync10(sourceOrOptions, "utf8");
106994
106994
  } catch {
@@ -106996,7 +106996,7 @@ function loadAgentMappings(poolOrRegistry, sourceOrOptions = {}) {
106996
106996
  }
106997
106997
  } else {
106998
106998
  const cachedTiny = join13(cacheDir, `${sourceOrOptions}.tiny`);
106999
- if (existsSync14(cachedTiny)) {
106999
+ if (existsSync15(cachedTiny)) {
107000
107000
  try {
107001
107001
  mappings = readFileSync10(cachedTiny, "utf8");
107002
107002
  } catch {}
@@ -107008,7 +107008,7 @@ function loadAgentMappings(poolOrRegistry, sourceOrOptions = {}) {
107008
107008
  } else if (sourceOrOptions && typeof sourceOrOptions === "object") {
107009
107009
  if (sourceOrOptions.buildId) {
107010
107010
  const cachedTiny = join13(cacheDir, `${sourceOrOptions.buildId}.tiny`);
107011
- if (existsSync14(cachedTiny)) {
107011
+ if (existsSync15(cachedTiny)) {
107012
107012
  try {
107013
107013
  mappings = readFileSync10(cachedTiny, "utf8");
107014
107014
  } catch {}
@@ -107024,7 +107024,7 @@ function loadAgentMappings(poolOrRegistry, sourceOrOptions = {}) {
107024
107024
  mappings = sourceOrOptions.build.mappings;
107025
107025
  } else if (!mappings && typeof sourceOrOptions.jarPath === "string") {
107026
107026
  const tinyPath = sourceOrOptions.jarPath.replace(/\.jar$/, ".tiny");
107027
- if (existsSync14(tinyPath)) {
107027
+ if (existsSync15(tinyPath)) {
107028
107028
  try {
107029
107029
  mappings = readFileSync10(tinyPath, "utf8");
107030
107030
  } catch {}
@@ -107063,7 +107063,7 @@ var init_agent_builder = __esm(() => {
107063
107063
  });
107064
107064
 
107065
107065
  // packages/java/agent/dist/loader.js
107066
- import { existsSync as existsSync15, readFileSync as readFileSync11 } from "fs";
107066
+ import { existsSync as existsSync16, readFileSync as readFileSync11 } from "fs";
107067
107067
  function extractClassNameFromClassBytes(bytes) {
107068
107068
  if (!bytes || bytes.length < 10)
107069
107069
  return null;
@@ -107146,7 +107146,7 @@ async function injectAgentInMemory(java, options = {}) {
107146
107146
  let className;
107147
107147
  let mappings = options.mappings;
107148
107148
  if (options.classPath) {
107149
- if (!existsSync15(options.classPath)) {
107149
+ if (!existsSync16(options.classPath)) {
107150
107150
  throw new Error(`Agent .class file not found at: ${options.classPath}`);
107151
107151
  }
107152
107152
  bytecode = new Uint8Array(readFileSync11(options.classPath));
@@ -107334,7 +107334,7 @@ async function injectAgentViaClassLoader(java, options = {}) {
107334
107334
  if (options.buildResult && "jarPath" in options.buildResult) {
107335
107335
  jarPath = options.buildResult.jarPath;
107336
107336
  mappings = options.buildResult.mappings ?? mappings;
107337
- } else if (!jarPath || !existsSync15(jarPath)) {
107337
+ } else if (!jarPath || !existsSync16(jarPath)) {
107338
107338
  if (verbose)
107339
107339
  console.log(`[njava-agent] Compiling/resolving agent JAR for Java ${options.targetVersion ?? "auto"}...`);
107340
107340
  const buildRes = await getAgentJar({
@@ -107346,7 +107346,7 @@ async function injectAgentViaClassLoader(java, options = {}) {
107346
107346
  mappings = buildRes.mappings ?? mappings;
107347
107347
  } else if (jarPath && !mappings) {
107348
107348
  const tinyPath = jarPath.replace(/\.jar$/, ".tiny");
107349
- if (existsSync15(tinyPath)) {
107349
+ if (existsSync16(tinyPath)) {
107350
107350
  try {
107351
107351
  mappings = readFileSync11(tinyPath, "utf8");
107352
107352
  } catch {}
@@ -111850,7 +111850,7 @@ var init_dist13 = __esm(() => {
111850
111850
  });
111851
111851
 
111852
111852
  // packages/exoproc-mcp/src/tools/session.ts
111853
- import { existsSync as existsSync16, unlinkSync as unlinkSync5, writeFileSync as writeFileSync12 } from "fs";
111853
+ import { existsSync as existsSync17, unlinkSync as unlinkSync5, writeFileSync as writeFileSync12 } from "fs";
111854
111854
  import { tmpdir as tmpdir10 } from "os";
111855
111855
  import { join as join15 } from "path";
111856
111856
  function getSessionSavedArgs() {
@@ -112025,7 +112025,7 @@ async function closeAccessor(options) {
112025
112025
  console.error("[closeAccessor] s.accessor.close error:", err);
112026
112026
  }
112027
112027
  try {
112028
- if (existsSync16(s.sessionFile)) {
112028
+ if (existsSync17(s.sessionFile)) {
112029
112029
  unlinkSync5(s.sessionFile);
112030
112030
  }
112031
112031
  } catch {}
@@ -114422,12 +114422,12 @@ var EMBEDDED_CAPSTONE_DLL_BASE64 = "TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAA
114422
114422
  // packages/capstone/core/dist/def/index.js
114423
114423
  import { fileURLToPath } from "url";
114424
114424
  import { dirname as dirname8, join as join16 } from "path";
114425
- import { existsSync as existsSync17, statSync as statSync6, writeFileSync as writeFileSync13 } from "fs";
114425
+ import { existsSync as existsSync18, statSync as statSync6, writeFileSync as writeFileSync13 } from "fs";
114426
114426
  import { tmpdir as tmpdir11 } from "os";
114427
114427
  function findCapstoneDll() {
114428
114428
  try {
114429
114429
  const cached = join16(getDepsCacheDir2(), "capstone.dll");
114430
- if (existsSync17(cached)) {
114430
+ if (existsSync18(cached)) {
114431
114431
  return cached;
114432
114432
  }
114433
114433
  } catch {}
@@ -114443,7 +114443,7 @@ function findCapstoneDll() {
114443
114443
  join16(process.cwd(), "packages/capstone/deps/capstone.dll")
114444
114444
  ];
114445
114445
  for (const candidate of candidates) {
114446
- if (existsSync17(candidate)) {
114446
+ if (existsSync18(candidate)) {
114447
114447
  return candidate;
114448
114448
  }
114449
114449
  }
@@ -114462,7 +114462,7 @@ function findCapstoneDll() {
114462
114462
  const tempDllPath = join16(tmpdir11(), "exoproc_capstone.dll");
114463
114463
  try {
114464
114464
  const buf = Buffer.from(EMBEDDED_CAPSTONE_DLL_BASE64, "base64");
114465
- if (!existsSync17(tempDllPath) || statSync6(tempDllPath).size !== buf.length) {
114465
+ if (!existsSync18(tempDllPath) || statSync6(tempDllPath).size !== buf.length) {
114466
114466
  writeFileSync13(tempDllPath, buf);
114467
114467
  }
114468
114468
  return tempDllPath;
@@ -119399,11 +119399,11 @@ Failed to capture screenshot:`, result);
119399
119399
  }
119400
119400
 
119401
119401
  // packages/exoproc/src/commands/compile.ts
119402
- import { readFileSync as readFileSync14, existsSync as existsSync18 } from "fs";
119402
+ import { readFileSync as readFileSync14, existsSync as existsSync19 } from "fs";
119403
119403
  async function commandCompile(options) {
119404
119404
  await Promise.resolve().then(() => init_src());
119405
119405
  let source = options.codeOrPath;
119406
- if (existsSync18(source)) {
119406
+ if (existsSync19(source)) {
119407
119407
  source = readFileSync14(source, "utf8");
119408
119408
  }
119409
119409
  const result = await compileC({
@@ -119477,12 +119477,12 @@ async function commandExec(options) {
119477
119477
  }
119478
119478
 
119479
119479
  // packages/exoproc/src/commands/run.ts
119480
- import { existsSync as existsSync19, readFileSync as readFileSync15 } from "fs";
119480
+ import { existsSync as existsSync20, readFileSync as readFileSync15 } from "fs";
119481
119481
  import { resolve as resolve9 } from "path";
119482
119482
  async function commandRun(scriptPath) {
119483
119483
  await Promise.resolve().then(() => init_src());
119484
119484
  const absPath = resolve9(process.cwd(), scriptPath);
119485
- if (!existsSync19(absPath)) {
119485
+ if (!existsSync20(absPath)) {
119486
119486
  console.error(`Script not found: ${absPath}`);
119487
119487
  process.exit(1);
119488
119488
  }
@@ -119501,9 +119501,13 @@ async function commandRun(scriptPath) {
119501
119501
  }
119502
119502
  var init_run = () => {};
119503
119503
 
119504
+ // packages/exoproc/src/cli.ts
119505
+ import readline from "readline";
119506
+
119504
119507
  // packages/exoproc/src/setup/index.ts
119505
119508
  import { homedir } from "os";
119506
- import { join as join3 } from "path";
119509
+ import { basename, join as join3 } from "path";
119510
+ import { existsSync as existsSync4 } from "fs";
119507
119511
 
119508
119512
  // packages/exoproc/src/setup/clients.ts
119509
119513
  import { existsSync } from "fs";
@@ -119573,21 +119577,15 @@ var SUPPORTED_CLIENTS = [
119573
119577
  id: "gemini_cli",
119574
119578
  displayName: "Gemini CLI / Antigravity",
119575
119579
  format: "json",
119576
- getConfigPaths: (ctx) => {
119577
- const paths = [
119578
- join(ctx.home, ".gemini", "antigravity", "mcp_config.json"),
119579
- join(ctx.home, ".gemini", "settings.json")
119580
- ];
119581
- if (existsSync(join(ctx.cwd, ".gemini"))) {
119582
- paths.push(join(ctx.cwd, ".gemini", "mcp_config.json"));
119583
- }
119584
- return paths;
119585
- },
119580
+ getConfigPaths: (ctx) => [
119581
+ join(ctx.home, ".gemini", "config", "mcp_config.json")
119582
+ ],
119586
119583
  getSkillPaths: (ctx) => [
119584
+ join(ctx.home, ".gemini", "config", "skills", "exoproc", "SKILL.md"),
119587
119585
  join(ctx.home, ".gemini", "antigravity", "skills", "exoproc", "SKILL.md"),
119588
- join(ctx.home, ".agents", "skills", "exoproc", "SKILL.md")
119586
+ join(ctx.cwd, ".agents", "skills", "exoproc", "SKILL.md")
119589
119587
  ],
119590
- detect: (ctx) => existsSync(join(ctx.home, ".gemini")) || existsSync(join(ctx.home, ".agents"))
119588
+ detect: (ctx) => existsSync(join(ctx.home, ".gemini")) || existsSync(join(ctx.home, ".agents")) || existsSync(join(ctx.cwd, ".agents"))
119591
119589
  },
119592
119590
  {
119593
119591
  id: "cline",
@@ -119645,7 +119643,11 @@ import {
119645
119643
  } from "fs";
119646
119644
  import { dirname as dirname2 } from "path";
119647
119645
  function parseJsonc(content) {
119648
- const cleaned = content.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^\\:])\/\/.*$/gm, "$1").replace(/,\s*([}\]])/g, "$1");
119646
+ if (!content || !content.trim())
119647
+ return {};
119648
+ const cleaned = content.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^\\:])\/\/.*$/gm, "$1").replace(/,\s*([}\]])/g, "$1").trim();
119649
+ if (!cleaned)
119650
+ return {};
119649
119651
  return JSON.parse(cleaned);
119650
119652
  }
119651
119653
  function isClientConfigured(client, configPath, command) {
@@ -119653,6 +119655,8 @@ function isClientConfigured(client, configPath, command) {
119653
119655
  return false;
119654
119656
  try {
119655
119657
  const raw = readFileSync(configPath, "utf8");
119658
+ if (!raw.trim())
119659
+ return false;
119656
119660
  const doc = parseJsonc(raw);
119657
119661
  if (client.format === "zed") {
119658
119662
  const entry = doc?.context_servers?.exoproc;
@@ -119676,14 +119680,16 @@ function updateClientConfig(client, configPath, command, dryRun = false) {
119676
119680
  let doc = {};
119677
119681
  if (existsSync2(configPath)) {
119678
119682
  const content = readFileSync(configPath, "utf8");
119679
- try {
119680
- doc = parseJsonc(content);
119681
- } catch (err) {
119682
- return {
119683
- path: configPath,
119684
- status: "failed",
119685
- error: `Existing config at ${configPath} is not valid JSON/JSONC: ${err.message}`
119686
- };
119683
+ if (content.trim()) {
119684
+ try {
119685
+ doc = parseJsonc(content);
119686
+ } catch (err) {
119687
+ return {
119688
+ path: configPath,
119689
+ status: "failed",
119690
+ error: `Existing config at ${configPath} is not valid JSON/JSONC: ${err.message}`
119691
+ };
119692
+ }
119687
119693
  }
119688
119694
  }
119689
119695
  if (isClientConfigured(client, configPath, command)) {
@@ -119846,6 +119852,18 @@ function installSkills(paths, dryRun = false) {
119846
119852
  }
119847
119853
 
119848
119854
  // packages/exoproc/src/setup/index.ts
119855
+ function resolveBunCommand(home, platform) {
119856
+ if (platform === "win32") {
119857
+ if (process.execPath && basename(process.execPath).toLowerCase().startsWith("bun")) {
119858
+ return process.execPath;
119859
+ }
119860
+ const defaultWinBun = join3(home, ".bun", "bin", "bun.exe");
119861
+ if (existsSync4(defaultWinBun)) {
119862
+ return defaultWinBun;
119863
+ }
119864
+ }
119865
+ return "bun";
119866
+ }
119849
119867
  function createSetupContext(options) {
119850
119868
  const home = homedir();
119851
119869
  const platform = process.platform;
@@ -119853,11 +119871,12 @@ function createSetupContext(options) {
119853
119871
  const cwd = process.cwd();
119854
119872
  let command = options?.command;
119855
119873
  if (!command || command.length === 0) {
119874
+ const bunCmd = resolveBunCommand(home, platform);
119856
119875
  if (options?.dev) {
119857
119876
  const localDist = join3(cwd, "packages", "exoproc", "dist", "cli.js");
119858
- command = ["bun", localDist, "mcp"];
119877
+ command = [bunCmd, localDist, "mcp"];
119859
119878
  } else {
119860
- command = ["bun", "x", "exoproc", "mcp"];
119879
+ command = [bunCmd, "x", "exoproc", "mcp"];
119861
119880
  }
119862
119881
  }
119863
119882
  return {
@@ -119977,7 +119996,7 @@ var mainLogger = import_winston.default.createLogger({
119977
119996
  ]
119978
119997
  });
119979
119998
  // packages/utils/src/cache.ts
119980
- import { existsSync as existsSync4, mkdirSync as mkdirSync3, rmSync } from "fs";
119999
+ import { existsSync as existsSync5, mkdirSync as mkdirSync3, rmSync } from "fs";
119981
120000
  import { tmpdir } from "os";
119982
120001
  import { join as join4 } from "path";
119983
120002
  function getCacheDir(subpath) {
@@ -120004,7 +120023,7 @@ function getCacheDir(subpath) {
120004
120023
  }
120005
120024
  }
120006
120025
  const finalDir = subpath ? join4(baseDir, subpath) : baseDir;
120007
- if (!existsSync4(finalDir)) {
120026
+ if (!existsSync5(finalDir)) {
120008
120027
  try {
120009
120028
  mkdirSync3(finalDir, { recursive: true });
120010
120029
  } catch {}
@@ -120016,13 +120035,13 @@ import {
120016
120035
  createWriteStream,
120017
120036
  mkdirSync as mkdirSync4,
120018
120037
  createReadStream,
120019
- existsSync as existsSync5,
120038
+ existsSync as existsSync6,
120020
120039
  readFileSync as readFileSync3,
120021
120040
  readdirSync,
120022
120041
  statSync,
120023
120042
  copyFileSync as copyFileSync2
120024
120043
  } from "fs";
120025
- import { join as join5, dirname as dirname4, basename, resolve, isAbsolute } from "path";
120044
+ import { join as join5, dirname as dirname4, basename as basename2, resolve, isAbsolute } from "path";
120026
120045
  import { randomBytes, createHash } from "crypto";
120027
120046
  init_unzip();
120028
120047
  function getDepsCacheDir() {
@@ -120035,18 +120054,18 @@ function computeHash(filePath, algorithm = "sha1") {
120035
120054
  function findWorkspaceDepsConfigs(workspaceRoot) {
120036
120055
  const found = [];
120037
120056
  const packagesDir = join5(workspaceRoot, "packages");
120038
- if (!existsSync5(packagesDir))
120057
+ if (!existsSync6(packagesDir))
120039
120058
  return found;
120040
120059
  const searchDir = (dir) => {
120041
- if (!existsSync5(dir))
120060
+ if (!existsSync6(dir))
120042
120061
  return;
120043
120062
  const items = readdirSync(dir, { withFileTypes: true });
120044
120063
  const depsPath = join5(dir, "deps.json");
120045
120064
  const altDepsPath = join5(dir, "exoproc-deps.json");
120046
- if (existsSync5(depsPath)) {
120065
+ if (existsSync6(depsPath)) {
120047
120066
  let pkgName;
120048
120067
  const pkgJson = join5(dir, "package.json");
120049
- if (existsSync5(pkgJson)) {
120068
+ if (existsSync6(pkgJson)) {
120050
120069
  try {
120051
120070
  pkgName = JSON.parse(readFileSync3(pkgJson, "utf-8")).name;
120052
120071
  } catch {}
@@ -120056,10 +120075,10 @@ function findWorkspaceDepsConfigs(workspaceRoot) {
120056
120075
  configPath: depsPath,
120057
120076
  packageName: pkgName
120058
120077
  });
120059
- } else if (existsSync5(altDepsPath)) {
120078
+ } else if (existsSync6(altDepsPath)) {
120060
120079
  let pkgName;
120061
120080
  const pkgJson = join5(dir, "package.json");
120062
- if (existsSync5(pkgJson)) {
120081
+ if (existsSync6(pkgJson)) {
120063
120082
  try {
120064
120083
  pkgName = JSON.parse(readFileSync3(pkgJson, "utf-8")).name;
120065
120084
  } catch {}
@@ -120112,19 +120131,19 @@ var STANDARD_EXOPROC_DEPS = [
120112
120131
  }
120113
120132
  ];
120114
120133
  function inspectDepChecksum(dep, packageDir) {
120115
- const filename = basename(dep.target);
120134
+ const filename = basename2(dep.target);
120116
120135
  let foundPath = null;
120117
120136
  let source = "missing";
120118
120137
  if (packageDir) {
120119
120138
  const localTarget = isAbsolute(dep.target) ? dep.target : resolve(packageDir, dep.target);
120120
- if (existsSync5(localTarget)) {
120139
+ if (existsSync6(localTarget)) {
120121
120140
  foundPath = localTarget;
120122
120141
  source = "local";
120123
120142
  }
120124
120143
  }
120125
120144
  if (!foundPath) {
120126
120145
  const cachedPath = join5(getDepsCacheDir(), filename);
120127
- if (existsSync5(cachedPath)) {
120146
+ if (existsSync6(cachedPath)) {
120128
120147
  foundPath = cachedPath;
120129
120148
  source = "cache";
120130
120149
  }
@@ -120140,7 +120159,7 @@ function inspectDepChecksum(dep, packageDir) {
120140
120159
  ];
120141
120160
  for (const dir of candidateDirs) {
120142
120161
  const p = join5(dir, filename);
120143
- if (existsSync5(p)) {
120162
+ if (existsSync6(p)) {
120144
120163
  foundPath = p;
120145
120164
  source = "local";
120146
120165
  break;
@@ -120226,7 +120245,7 @@ function inspectAllDeps(workspaceRoot) {
120226
120245
  }
120227
120246
  }
120228
120247
  for (const stdDep of STANDARD_EXOPROC_DEPS) {
120229
- const fn = basename(stdDep.target).toLowerCase();
120248
+ const fn = basename2(stdDep.target).toLowerCase();
120230
120249
  if (!processedFilenames.has(fn)) {
120231
120250
  results.push(inspectDepChecksum(stdDep));
120232
120251
  processedFilenames.add(fn);
@@ -120288,8 +120307,8 @@ var package_default = {
120288
120307
  publishConfig: {
120289
120308
  access: "public"
120290
120309
  },
120291
- mcpName: "io.github.wwoldan/exoproc",
120292
- version: "0.6.4",
120310
+ mcpName: "io.github.woldann/exoproc",
120311
+ version: "0.6.7",
120293
120312
  description: "Unified CLI and Model Context Protocol (MCP) server for native Windows x64 reverse engineering, thread hijacking, function redirection, memory inspection, and runtime instrumentation.",
120294
120313
  main: "./dist/index.js",
120295
120314
  bin: {
@@ -120354,7 +120373,61 @@ var package_default = {
120354
120373
  };
120355
120374
 
120356
120375
  // packages/exoproc/src/cli.ts
120357
- var VERSION = package_default.version || "0.6.3";
120376
+ var VERSION = package_default.version || "0.6.5";
120377
+ async function promptSelectClients(clients, detectedIds) {
120378
+ console.log(`\uD83D\uDCE6 Select the AI agent(s) you want to configure:
120379
+ `);
120380
+ clients.forEach((c, idx) => {
120381
+ const isDetected = detectedIds.has(c.id);
120382
+ const tag = isDetected ? " (detected)" : "";
120383
+ console.log(` [${idx + 1}] ${c.displayName}${tag}`);
120384
+ });
120385
+ console.log(` [A] All Agents`);
120386
+ console.log(` [Q] Cancel / Quit
120387
+ `);
120388
+ const rl = readline.createInterface({
120389
+ input: process.stdin,
120390
+ output: process.stdout
120391
+ });
120392
+ return new Promise((resolve) => {
120393
+ rl.question('Enter numbers separated by comma (e.g. 1, 3) or "A" for all [default: A]: ', (raw) => {
120394
+ rl.close();
120395
+ const input = raw.trim().toLowerCase();
120396
+ if (!input || input === "a" || input === "all") {
120397
+ resolve(clients.map((c) => c.id));
120398
+ return;
120399
+ }
120400
+ if (input === "q" || input === "quit" || input === "exit") {
120401
+ resolve([]);
120402
+ return;
120403
+ }
120404
+ const selectedIds = new Set;
120405
+ const parts = input.split(/[\s,]+/);
120406
+ for (const part of parts) {
120407
+ const num = parseInt(part, 10);
120408
+ if (!isNaN(num) && num >= 1 && num <= clients.length) {
120409
+ selectedIds.add(clients[num - 1].id);
120410
+ continue;
120411
+ }
120412
+ const lower = part.toLowerCase();
120413
+ if (lower === "antigravity" || lower === "gemini") {
120414
+ selectedIds.add("gemini_cli");
120415
+ continue;
120416
+ }
120417
+ const found = clients.find((c) => c.id.toLowerCase() === lower || c.displayName.toLowerCase().includes(lower));
120418
+ if (found) {
120419
+ selectedIds.add(found.id);
120420
+ }
120421
+ }
120422
+ if (selectedIds.size === 0) {
120423
+ console.log("\u26A0\uFE0F No valid agents selected.");
120424
+ resolve([]);
120425
+ } else {
120426
+ resolve(Array.from(selectedIds));
120427
+ }
120428
+ });
120429
+ });
120430
+ }
120358
120431
  function printBanner() {
120359
120432
  console.log(`
120360
120433
  \u26A1 EXOPROC v${VERSION}
@@ -120423,20 +120496,43 @@ async function cli(args = process.argv.slice(2)) {
120423
120496
  return;
120424
120497
  }
120425
120498
  if (!cmd || cmd === "setup") {
120426
- const yes = args.includes("--yes") || args.includes("-y");
120499
+ const isAll = args.includes("--all");
120500
+ const yes = args.includes("--yes") || args.includes("-y") || isAll;
120427
120501
  const dryRun = args.includes("--dry-run");
120428
120502
  const skillOnly = args.includes("--skill-only");
120429
120503
  const dev = args.includes("--dev") || args.includes("--local");
120430
120504
  let clients;
120431
120505
  const clientIdx = args.findIndex((a) => a === "--client" || a === "-c");
120432
120506
  if (clientIdx !== -1 && args[clientIdx + 1]) {
120433
- clients = [args[clientIdx + 1]];
120507
+ const cArg = args[clientIdx + 1].toLowerCase();
120508
+ if (cArg === "antigravity" || cArg === "gemini") {
120509
+ clients = ["gemini_cli"];
120510
+ } else {
120511
+ clients = [cArg];
120512
+ }
120434
120513
  }
120435
120514
  if (!isJson) {
120436
120515
  printBanner();
120516
+ }
120517
+ if (!clients && !yes && !isJson) {
120518
+ const ctx = createSetupContext({ dev });
120519
+ const detected = detectClients(ctx);
120520
+ const detectedIds = new Set(detected.filter((d) => d.detected).map((d) => d.client.id));
120521
+ clients = await promptSelectClients(SUPPORTED_CLIENTS, detectedIds);
120522
+ if (clients.length === 0) {
120523
+ console.log("Setup cancelled. No configurations were changed.");
120524
+ return;
120525
+ }
120526
+ } else if (!isJson) {
120437
120527
  console.log("\uD83D\uDD0D Detecting installed AI agents and IDEs...");
120438
120528
  }
120439
- const summary = await runSetup({ yes, dryRun, clients, skillOnly, dev });
120529
+ const summary = await runSetup({
120530
+ yes: true,
120531
+ dryRun,
120532
+ clients,
120533
+ skillOnly,
120534
+ dev
120535
+ });
120440
120536
  if (isJson) {
120441
120537
  console.log(JSON.stringify(summary, null, 2));
120442
120538
  return;