mrmainspring 0.2.3 → 0.2.4

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.
@@ -11,19 +11,38 @@ const CLIENTS = [
11
11
  { name: "Claude Desktop", path: "%APPDATA%/Claude/claude_desktop_config.json", platforms: ["win32"], format: "standard" },
12
12
  { name: "Claude Desktop", path: "~/.config/Claude/claude_desktop_config.json", platforms: ["linux"], format: "standard" },
13
13
  // Claude Code CLI
14
- { name: "Claude Code", path: "~/.claude/settings.json", platforms: ["darwin", "linux", "win32"], format: "standard" },
14
+ {
15
+ name: "Claude Code", path: "~/.claude/settings.json", platforms: ["darwin", "linux", "win32"], format: "standard",
16
+ appPaths: ["/usr/local/bin/claude", "/usr/bin/claude"]
17
+ },
15
18
  // Cursor
16
- { name: "Cursor", path: "~/.cursor/mcp.json", platforms: ["darwin", "linux"], format: "standard" },
17
- { name: "Cursor", path: "%USERPROFILE%/.cursor/mcp.json", platforms: ["win32"], format: "standard" },
19
+ {
20
+ name: "Cursor", path: "~/.cursor/mcp.json", platforms: ["darwin", "linux"], format: "standard",
21
+ appPaths: ["/Applications/Cursor.app", `${homedir()}/Applications/Cursor.app`]
22
+ },
23
+ {
24
+ name: "Cursor", path: "%USERPROFILE%/.cursor/mcp.json", platforms: ["win32"], format: "standard",
25
+ appPaths: ["C:/Users/Default/AppData/Local/Programs/cursor/Cursor.exe"]
26
+ },
18
27
  // Windsurf
19
- { name: "Windsurf", path: "~/.codeium/windsurf/mcp_config.json", platforms: ["darwin", "linux", "win32"], format: "standard" },
28
+ {
29
+ name: "Windsurf", path: "~/.codeium/windsurf/mcp_config.json", platforms: ["darwin", "linux", "win32"], format: "standard",
30
+ appPaths: ["/Applications/Windsurf.app", `${homedir()}/Applications/Windsurf.app`]
31
+ },
20
32
  { name: "Windsurf", path: "%APPDATA%/Windsurf/User/globalStorage/codeium.windsurf/mcp_config.json", platforms: ["win32"], format: "standard" },
21
33
  // Zed
22
- { name: "Zed", path: "~/.config/zed/settings.json", platforms: ["darwin", "linux"], format: "zed" },
34
+ {
35
+ name: "Zed", path: "~/.config/zed/settings.json", platforms: ["darwin", "linux"], format: "zed",
36
+ appPaths: ["/Applications/Zed.app", `${homedir()}/Applications/Zed.app`]
37
+ },
23
38
  // Continue.dev
24
39
  { name: "Continue", path: "~/.continue/config.json", platforms: ["darwin", "linux", "win32"], format: "continue" },
25
40
  // VS Code (user-level MCP config — requires GitHub Copilot or MCP extension)
26
- { name: "VS Code", path: "~/.vscode/mcp.json", platforms: ["darwin", "linux", "win32"], format: "standard" },
41
+ {
42
+ name: "VS Code", path: "~/.vscode/mcp.json", platforms: ["darwin", "linux"], format: "standard",
43
+ appPaths: ["/Applications/Visual Studio Code.app", `${homedir()}/Applications/Visual Studio Code.app`, "/usr/bin/code", "/usr/local/bin/code"]
44
+ },
45
+ { name: "VS Code", path: "~/.vscode/mcp.json", platforms: ["win32"], format: "standard" },
27
46
  // Cline (VS Code extension by saoudrizwan)
28
47
  {
29
48
  name: "Cline",
@@ -100,9 +119,11 @@ function expandPath(p, env) {
100
119
  .replace(/%APPDATA%/gi, env.APPDATA ?? "")
101
120
  .replace(/%USERPROFILE%/gi, env.USERPROFILE ?? home);
102
121
  }
103
- function isInstalled(configPath, detectDir) {
122
+ function isInstalled(configPath, detectDir, appPaths) {
104
123
  const dir = detectDir ?? dirname(configPath);
105
- return existsSync(dir) || existsSync(configPath);
124
+ if (existsSync(dir) || existsSync(configPath))
125
+ return true;
126
+ return appPaths?.some(p => existsSync(p)) ?? false;
106
127
  }
107
128
  function readJson(path) {
108
129
  if (!existsSync(path))
@@ -163,7 +184,7 @@ export function detectClients(env = process.env) {
163
184
  continue;
164
185
  seen.add(key);
165
186
  const detectDir = client.detectDir ? expandPath(client.detectDir, env) : undefined;
166
- results.push({ name: client.name, configPath, installed: isInstalled(configPath, detectDir), format: client.format });
187
+ results.push({ name: client.name, configPath, installed: isInstalled(configPath, detectDir, client.appPaths), format: client.format });
167
188
  }
168
189
  return results;
169
190
  }
@@ -199,7 +220,7 @@ export function setupAllClients(env = process.env) {
199
220
  continue;
200
221
  seen.add(key);
201
222
  const detectDir = client.detectDir ? expandPath(client.detectDir, env) : undefined;
202
- if (!isInstalled(configPath, detectDir)) {
223
+ if (!isInstalled(configPath, detectDir, client.appPaths)) {
203
224
  results.push({ name: client.name, configPath, status: "not-installed" });
204
225
  continue;
205
226
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrmainspring",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Mr Mainspring MCP backend with memory, Grimoire policies, audit, Casper anchoring, and x402 settlement boundaries.",
5
5
  "license": "MIT",
6
6
  "type": "module",