vexp-cli 2.0.7 → 2.0.9

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 (2) hide show
  1. package/dist/cli.js +18 -3
  2. package/package.json +6 -6
package/dist/cli.js CHANGED
@@ -93,8 +93,16 @@ function runBinary(binaryPath, args) {
93
93
  /** Promise-based binary runner that doesn't call process.exit(). */
94
94
  function runBinaryAsync(binaryPath, args, options) {
95
95
  return new Promise((resolve, reject) => {
96
+ // In REPL mode: never inherit stdin — it breaks readline state.
97
+ // "ignore" for stdin + "inherit" for stdout/stderr shows output
98
+ // without touching the parent's stdin stream.
99
+ const stdio = options?.silent
100
+ ? "pipe"
101
+ : replMode
102
+ ? ["ignore", "inherit", "inherit"]
103
+ : "inherit";
96
104
  const child = spawn(binaryPath, args, {
97
- stdio: options?.silent ? "pipe" : "inherit",
105
+ stdio,
98
106
  cwd: options?.cwd,
99
107
  env: binaryEnv(binaryPath),
100
108
  });
@@ -675,9 +683,16 @@ async function runSetupInteractive(rl) {
675
683
  const workspaceRoot = process.cwd();
676
684
  const binaryPath = ensureBinary();
677
685
  console.log(chalk.bold(`\n vexp setup — ${workspaceRoot}\n`));
678
- // Step 1: Index
686
+ // Step 1: Index (async+piped to avoid breaking the REPL readline —
687
+ // spawnSync with "inherit" blocks the event loop and can leave stdin
688
+ // in a dirty state that makes readline emit 'close' immediately).
679
689
  console.log(chalk.dim(" Indexing codebase...\n"));
680
- runBinary(binaryPath, ["init", workspaceRoot]);
690
+ try {
691
+ await runBinaryAsync(binaryPath, ["init", workspaceRoot], { cwd: workspaceRoot });
692
+ }
693
+ catch {
694
+ // Non-fatal: continue to agent config even if indexing had issues
695
+ }
681
696
  // Step 1.5: Start daemon + MCP HTTP server (parity with non-interactive setup)
682
697
  await startBackgroundServices(binaryPath, workspaceRoot);
683
698
  // Step 2: Select agents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vexp-cli",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Vexp — Context Engine for AI Coding Agents. Pre-indexes your codebase into a dependency graph and delivers ranked context to any MCP-compatible agent. 58% lower cost per task, 90% fewer tool calls (SWE-bench Verified). Works with Claude Code, Cursor, Copilot, Windsurf, Codex, Cline, Aider, and 12+ agents. Local-first. Your code never leaves your machine.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -99,10 +99,10 @@
99
99
  "node": ">=20.0.0"
100
100
  },
101
101
  "optionalDependencies": {
102
- "@vexp/core-linux-x64": "2.0.7",
103
- "@vexp/core-linux-arm64": "2.0.7",
104
- "@vexp/core-darwin-x64": "2.0.7",
105
- "@vexp/core-darwin-arm64": "2.0.7",
106
- "@vexp/core-win32-x64": "2.0.7"
102
+ "@vexp/core-linux-x64": "2.0.9",
103
+ "@vexp/core-linux-arm64": "2.0.9",
104
+ "@vexp/core-darwin-x64": "2.0.9",
105
+ "@vexp/core-darwin-arm64": "2.0.9",
106
+ "@vexp/core-win32-x64": "2.0.9"
107
107
  }
108
108
  }