metheus-governance-mcp-cli 0.2.44 → 0.2.45

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/cli.mjs +13 -4
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -520,6 +520,10 @@ function isEditorInstallDirectory(candidatePath) {
520
520
  if (normalized.includes("\\appdata\\local\\programs\\microsoft vs code")) return true;
521
521
  if (normalized.includes("\\appdata\\local\\programs\\antigravity")) return true;
522
522
  if (normalized.includes("\\appdata\\local\\programs\\cursor")) return true;
523
+ if (normalized.includes("\\program files\\antigravity")) return true;
524
+ if (normalized.includes("\\program files (x86)\\antigravity")) return true;
525
+ if (normalized.includes("\\program files\\cursor")) return true;
526
+ if (normalized.includes("\\program files (x86)\\cursor")) return true;
523
527
  if (normalized.includes("\\program files\\microsoft vs code")) return true;
524
528
  if (normalized.includes("\\program files (x86)\\microsoft vs code")) return true;
525
529
  return false;
@@ -3641,10 +3645,12 @@ function shouldUseSafeToolAliasesForClient(initParamsRaw) {
3641
3645
  function canTrustProcessCwdForClient(clientNameRaw) {
3642
3646
  const name = String(clientNameRaw || "").trim().toLowerCase();
3643
3647
  if (!name) return false;
3644
- // Codex app-server may not pass workspace signals reliably; never trust bare process.cwd().
3648
+ // Codex/Cursor/Antigravity can run MCP from app/install directories.
3645
3649
  if (name.includes("codex")) return false;
3646
- // VS Code forks generally spawn MCP in active workspace folder.
3647
- return name.includes("cursor") || name.includes("antigravity");
3650
+ if (name.includes("cursor")) return false;
3651
+ if (name.includes("antigravity")) return false;
3652
+ // CLI-style clients (e.g., Gemini/Claude Code) usually launch from active project cwd.
3653
+ return name.includes("gemini") || name.includes("claude");
3648
3654
  }
3649
3655
 
3650
3656
  function displayToolNameForClient(canonicalName, useSafeToolAliases = false) {
@@ -4389,7 +4395,10 @@ async function runProxy(flags) {
4389
4395
  sessionWorkspaceDir = strongRequestWorkspaceCandidate;
4390
4396
  sessionWorkspaceTrusted = true;
4391
4397
  } else if (weakRequestWorkspaceCandidate) {
4392
- sessionWorkspaceDir = weakRequestWorkspaceCandidate;
4398
+ // Keep trusted session workspace (e.g., roots/list) stable against weak per-request cwd noise.
4399
+ if (!sessionWorkspaceTrusted || !sessionWorkspaceDir) {
4400
+ sessionWorkspaceDir = weakRequestWorkspaceCandidate;
4401
+ }
4393
4402
  } else if (weakEnvWorkspaceCandidate) {
4394
4403
  sessionWorkspaceDir = weakEnvWorkspaceCandidate;
4395
4404
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metheus-governance-mcp-cli",
3
- "version": "0.2.44",
3
+ "version": "0.2.45",
4
4
  "description": "Metheus Governance MCP CLI (setup + stdio proxy)",
5
5
  "type": "module",
6
6
  "files": [