vexp-mcp 3.3.6 → 3.3.8

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.
@@ -142,13 +142,13 @@ export class DaemonClient {
142
142
  // the guard keeps the contract true for any other caller.
143
143
  if (readDailyLimitMarker(workspaceRoot))
144
144
  return;
145
- // Consent: this folder's own manifest, or, for a fresh git worktree, the
146
- // set-up checkout it belongs to (its daemon indexes the worktree). Not on
147
- // Windows: a daemon holds the worktree's index open past the session,
148
- // and Windows then refuses the harness's `git worktree remove` (git
149
- // unregisters the worktree and leaves the folder behind; reproduced on
150
- // Windows 11, 2026-09-30).
151
- if (!fs.existsSync(path.join(workspaceRoot, ".vexp", "manifest.json")) &&
145
+ // Consent: this folder's own record of being set up (setUpForVexp), or,
146
+ // for a fresh git worktree, the set-up checkout it belongs to (its daemon
147
+ // indexes the worktree). Not on Windows: a daemon holds the worktree's
148
+ // index open past the session, and Windows then refuses the harness's
149
+ // `git worktree remove` (git unregisters the worktree and leaves the
150
+ // folder behind; reproduced on Windows 11, 2026-09-30).
151
+ if (!setUpForVexp(workspaceRoot) &&
152
152
  !(process.platform !== "win32" && worktreeConsentSource(workspaceRoot)))
153
153
  return;
154
154
  // The daemon refuses the home directory itself; not asking spares the
@@ -616,6 +616,17 @@ export class DaemonClient {
616
616
  }
617
617
  }
618
618
  }
619
+ /**
620
+ * The platform key of the engine this server runs, as its packages name
621
+ * it. Windows on ARM64 runs the x64 engine under emulation: npm installs
622
+ * @vexp/core-win32-x64 there and the win32-arm64 VSIX carries it in
623
+ * binaries/vexp-core-win32-x64, so a key built from process.arch alone
624
+ * found no engine, and an ARM64 Node never started a daemon. Lockstep with
625
+ * the extension's getPlatformKey and the CLI's binary.ts.
626
+ */
627
+ export function corePlatformKey(platform = process.platform, arch = process.arch) {
628
+ return `${platform}-${arch === "arm64" && platform !== "win32" ? "arm64" : "x64"}`;
629
+ }
619
630
  /**
620
631
  * Locate the vexp-core binary from the MCP server's own filesystem
621
632
  * position. Supports three layouts:
@@ -639,7 +650,7 @@ function resolveVexpCoreBinary() {
639
650
  catch {
640
651
  scriptDir = process.cwd();
641
652
  }
642
- const plat = `${process.platform}-${process.arch === "arm64" ? "arm64" : "x64"}`;
653
+ const plat = corePlatformKey();
643
654
  const ext = process.platform === "win32" ? ".exe" : "";
644
655
  const candidates = [
645
656
  // CLI npm install: mcp-server.cjs → ../../@vexp/core-<plat>/bin/vexp-core
@@ -699,6 +710,34 @@ export function isVexpStateHome(dir) {
699
710
  const a = path.resolve(dir);
700
711
  return process.platform === "win32" ? a.toLowerCase() === stateHome.toLowerCase() : a === stateHome;
701
712
  }
713
+ /**
714
+ * The files in a folder's .vexp/ that say vexp was set up there on purpose,
715
+ * which is what lets this server start a daemon for it on its own:
716
+ * manifest.json, which most repositories commit; vexp.toml, which
717
+ * `vexp init` and `vexp setup` write and a team commits to share settings;
718
+ * workspace.json, the list of connected repositories. A repository can keep
719
+ * the manifest out of git (it is rewritten at every commit and pull) and
720
+ * commit vexp.toml instead, and a fresh clone still starts vexp at an
721
+ * agent's first call (field report, 2026-10-23).
722
+ *
723
+ * Never a bare .vexp/: vexp-core creates one wherever it computes a socket
724
+ * path. Never .vexp/.gitignore: the daemon writes it at every start, and
725
+ * personal mode commits one to keep vexp to the person who set it up.
726
+ *
727
+ * LOCAL_INDEX counts too: index.db is never committed, so it says vexp was
728
+ * run in this folder on this machine, and Codex's own server (vexp-core
729
+ * `mcp`, which builds it before any manifest) took it as consent while this
730
+ * one did not. It stays out of SET_UP_FILES, which are also the files that
731
+ * activate the VS Code extension: the search behind `workspaceContains`
732
+ * skips git-ignored files by default. Lockstep with vexp-core
733
+ * utils::CONSENT_FILES, one rule for both servers (field report,
734
+ * 2026-10-24); a vexp-core test reads these two lines.
735
+ */
736
+ const SET_UP_FILES = ["manifest.json", "vexp.toml", "workspace.json"];
737
+ const LOCAL_INDEX = "index.db";
738
+ export function setUpForVexp(dir) {
739
+ return [...SET_UP_FILES, LOCAL_INDEX].some((f) => fs.existsSync(path.join(dir, ".vexp", f)));
740
+ }
702
741
  /**
703
742
  * The main checkout a linked git worktree takes its consent from: set up with
704
743
  * vexp (manifest.json or index.db in its .vexp/) and not the state home.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vexp-mcp",
3
- "version": "3.3.6",
3
+ "version": "3.3.8",
4
4
  "license": "UNLICENSED",
5
5
  "description": "vexp MCP server — AI context tools for coding agents",
6
6
  "type": "module",