@snapback/cli 1.1.12 → 1.1.14

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 (41) hide show
  1. package/README.md +9 -9
  2. package/dist/{analysis-Z53F5FT2.js → analysis-C6XVLBAL.js} +3 -3
  3. package/dist/{analysis-Z53F5FT2.js.map → analysis-C6XVLBAL.js.map} +1 -1
  4. package/dist/{chunk-KPETDXQO.js → chunk-2TOJVUVJ.js} +296 -33
  5. package/dist/chunk-2TOJVUVJ.js.map +1 -0
  6. package/dist/chunk-5EQLSU5B.js +385 -0
  7. package/dist/chunk-5EQLSU5B.js.map +1 -0
  8. package/dist/{chunk-YOVA65PS.js → chunk-A3TUM7U4.js} +320 -63
  9. package/dist/chunk-A3TUM7U4.js.map +1 -0
  10. package/dist/{chunk-ISVRGBWT.js → chunk-LEXNOXPV.js} +6030 -632
  11. package/dist/chunk-LEXNOXPV.js.map +1 -0
  12. package/dist/{chunk-G7QXHNGB.js → chunk-OJNDAPC2.js} +41 -15
  13. package/dist/chunk-OJNDAPC2.js.map +1 -0
  14. package/dist/{chunk-NKBZIXCN.js → chunk-Q5XZ3DCB.js} +5 -5
  15. package/dist/{chunk-NKBZIXCN.js.map → chunk-Q5XZ3DCB.js.map} +1 -1
  16. package/dist/chunk-QLCHTUT5.js +1067 -0
  17. package/dist/chunk-QLCHTUT5.js.map +1 -0
  18. package/dist/dist-D2SHOZMS.js +8 -0
  19. package/dist/{dist-7UKXVKH3.js.map → dist-D2SHOZMS.js.map} +1 -1
  20. package/dist/{dist-7UKXVKH3.js → dist-L76VXYJ5.js} +3 -3
  21. package/dist/{dist-VDK7WEF4.js.map → dist-L76VXYJ5.js.map} +1 -1
  22. package/dist/dist-RPM72FHJ.js +5 -0
  23. package/dist/{dist-WKLJSPJT.js.map → dist-RPM72FHJ.js.map} +1 -1
  24. package/dist/index.js +38672 -24130
  25. package/dist/index.js.map +1 -1
  26. package/dist/learning-pruner-YSZSOOOC.js +7 -0
  27. package/dist/learning-pruner-YSZSOOOC.js.map +1 -0
  28. package/dist/{secure-credentials-6UMEU22H.js → secure-credentials-A4QHHOE2.js} +14 -6
  29. package/dist/secure-credentials-A4QHHOE2.js.map +1 -0
  30. package/dist/{snapback-dir-T3CRQRY6.js → snapback-dir-6QUSO6Y3.js} +3 -3
  31. package/dist/{snapback-dir-T3CRQRY6.js.map → snapback-dir-6QUSO6Y3.js.map} +1 -1
  32. package/dist/storage-H366UNAR.js +6 -0
  33. package/dist/storage-H366UNAR.js.map +1 -0
  34. package/package.json +8 -9
  35. package/dist/chunk-G7QXHNGB.js.map +0 -1
  36. package/dist/chunk-ISVRGBWT.js.map +0 -1
  37. package/dist/chunk-KPETDXQO.js.map +0 -1
  38. package/dist/chunk-YOVA65PS.js.map +0 -1
  39. package/dist/dist-VDK7WEF4.js +0 -5
  40. package/dist/dist-WKLJSPJT.js +0 -8
  41. package/dist/secure-credentials-6UMEU22H.js.map +0 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # @snapback/cli
2
-
3
- > **Git is for commits. SnapBack is for "oh no, what did I just do?"**
1
+ <p align="center">
2
+ <img src="./assets/github-cli.png" alt="SnapBack CLI - The command-line interface for effortless restores and snapshots" />
3
+ </p>
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@snapback/cli.svg)](https://www.npmjs.com/package/@snapback/cli)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@snapback/cli.svg)](https://www.npmjs.com/package/@snapback/cli)
7
- [![License](https://img.shields.io/npm/l/@snapback/cli.svg)](https://github.com/snapback-dev/snapback/blob/main/LICENSE)
7
+ [![License](https://img.shields.io/npm/l/@snapback/cli.svg)](https://github.com/snapback-dev/snapback-cli/blob/main/LICENSE)
8
8
 
9
9
  AI coding assistants like **Cursor**, **GitHub Copilot**, and **Claude** are incredible—until they're not. One wrong autocomplete can cascade into hours of debugging. Git doesn't help because you haven't committed yet.
10
10
 
@@ -38,12 +38,12 @@ SnapBack has two primary interfaces:
38
38
  The extension provides the best experience with automatic snapshots, visual recovery UI, and real-time risk indicators.
39
39
 
40
40
  ```
41
- ext install snapback-vscode
41
+ ext install MarcelleLabs.snapback-vscode
42
42
  ```
43
43
 
44
44
  Or search "SnapBack" in the VS Code Extensions marketplace.
45
45
 
46
- [![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/snapback.snapback-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=snapback.snapback-vscode)
46
+ [![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/MarcelleLabs.snapback-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=MarcelleLabs.snapback-vscode)
47
47
 
48
48
  ### 💻 CLI Tool
49
49
 
@@ -572,7 +572,7 @@ $ snap doctor
572
572
 
573
573
  | Package | Description |
574
574
  |---------|-------------|
575
- | [snapback-vscode](https://marketplace.visualstudio.com/items?itemName=snapback.snapback-vscode) | VS Code extension with visual UI |
575
+ | [MarcelleLabs.snapback-vscode](https://marketplace.visualstudio.com/items?itemName=MarcelleLabs.snapback-vscode) | VS Code extension with visual UI |
576
576
 
577
577
  ---
578
578
 
@@ -586,7 +586,7 @@ Unlock Pro features like checkpoint creation and restoration:
586
586
 
587
587
  ## License
588
588
 
589
- [Apache-2.0](https://github.com/snapback-dev/snapback/blob/main/LICENSE)
589
+ [Apache-2.0](https://github.com/snapback-dev/snapback-cli/blob/main/LICENSE)
590
590
 
591
591
  ---
592
592
 
@@ -595,5 +595,5 @@ Unlock Pro features like checkpoint creation and restoration:
595
595
  <a href="https://snapback.dev">Website</a> ·
596
596
  <a href="https://docs.snapback.dev">Docs</a> ·
597
597
  <a href="https://console.snapback.dev">Dashboard</a> ·
598
- <a href="https://discord.gg/snapback">Discord</a>
598
+ <a href="https://discord.gg/B4BXeYkE2F">Discord</a>
599
599
  </p>
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- export { ChangeImpactAnalyzer, CompletenessAnalyzer, SecurityAnalyzer, SyntaxAnalyzer, checkFilesForOrphanStatus, createChangeImpactAnalyzer, detectOrphans, filterOrphansToFiles, runStaticAnalysis } from './chunk-G7QXHNGB.js';
2
+ export { ChangeImpactAnalyzer, CompletenessAnalyzer, SecurityAnalyzer, SyntaxAnalyzer, checkFilesForOrphanStatus, createChangeImpactAnalyzer, detectOrphans, filterOrphansToFiles, runStaticAnalysis } from './chunk-OJNDAPC2.js';
3
3
  export { analyzeSkippedTests, detectSkippedTests, getSkippedTestSummary } from './chunk-QAKFE3NE.js';
4
4
  import './chunk-BW7RALUZ.js';
5
- //# sourceMappingURL=analysis-Z53F5FT2.js.map
6
- //# sourceMappingURL=analysis-Z53F5FT2.js.map
5
+ //# sourceMappingURL=analysis-C6XVLBAL.js.map
6
+ //# sourceMappingURL=analysis-C6XVLBAL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"analysis-Z53F5FT2.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"analysis-C6XVLBAL.js"}
@@ -4,7 +4,8 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
4
4
  import { homedir, platform } from 'os';
5
5
  import { join, resolve, dirname } from 'path';
6
6
  import { randomUUID } from 'crypto';
7
- import { execSync } from 'child_process';
7
+ import { exec, execSync } from 'child_process';
8
+ import { promisify } from 'util';
8
9
 
9
10
  var __defProp = Object.defineProperty;
10
11
  var __name2 = /* @__PURE__ */ __name((target, value) => __defProp(target, "name", {
@@ -35,7 +36,10 @@ var CLIENT_CONFIGS = {
35
36
  ] : [],
36
37
  join(_home, ".cursor/mcp.json")
37
38
  ], "cursor"),
38
- windsurf: /* @__PURE__ */ __name2((home) => [
39
+ windsurf: /* @__PURE__ */ __name2((home, cwd) => [
40
+ ...cwd ? [
41
+ join(cwd, ".windsurf/mcp.json")
42
+ ] : [],
39
43
  join(home, ".codeium/windsurf/mcp_config.json")
40
44
  ], "windsurf"),
41
45
  continue: /* @__PURE__ */ __name2((home) => [
@@ -63,21 +67,24 @@ var CLIENT_CONFIGS = {
63
67
  join(home, ".roo-code/mcp.json")
64
68
  ], "roo-code"),
65
69
  // Qoder (VS Code fork) - supports both project-level and global configs
66
- qoder: /* @__PURE__ */ __name2((home) => {
67
- switch (platform()) {
68
- case "darwin":
69
- return [
70
- join(home, "Library/Application Support/Qoder/SharedClientCache/extension/local/mcp.json")
71
- ];
72
- case "win32":
73
- return [
74
- join(process.env.APPDATA || "", "Qoder/mcp.json")
75
- ];
76
- default:
77
- return [
78
- join(home, ".config/Qoder/mcp.json")
79
- ];
80
- }
70
+ qoder: /* @__PURE__ */ __name2((home, cwd) => {
71
+ const workspaceConfig = cwd ? [
72
+ join(cwd, ".qoder-mcp-config.json")
73
+ ] : [];
74
+ const globalConfig = (() => {
75
+ switch (platform()) {
76
+ case "darwin":
77
+ return join(home, "Library/Application Support/Qoder/SharedClientCache/extension/local/mcp.json");
78
+ case "win32":
79
+ return join(process.env.APPDATA || "", "Qoder/mcp.json");
80
+ default:
81
+ return join(home, ".config/Qoder/mcp.json");
82
+ }
83
+ })();
84
+ return [
85
+ ...workspaceConfig,
86
+ globalConfig
87
+ ];
81
88
  }, "qoder")
82
89
  };
83
90
  var CLIENT_DISPLAY_NAMES = {
@@ -160,20 +167,29 @@ function checkForSnapback(config, format) {
160
167
  case "claude":
161
168
  case "cursor":
162
169
  case "windsurf":
163
- case "vscode":
164
170
  case "cline":
165
171
  case "roo-code":
166
172
  case "qoder":
167
173
  if ("mcpServers" in configObj && typeof configObj.mcpServers === "object" && configObj.mcpServers !== null) {
168
174
  const servers = configObj.mcpServers;
169
- return "snapback" in servers;
175
+ return "snapback" in servers || `snapback-${format}` in servers;
176
+ }
177
+ return false;
178
+ case "vscode":
179
+ if ("servers" in configObj && typeof configObj.servers === "object" && configObj.servers !== null) {
180
+ const servers = configObj.servers;
181
+ return "snapback" in servers || "snapback-vscode" in servers;
170
182
  }
171
183
  return false;
172
184
  case "gemini":
173
185
  case "zed":
186
+ if ("context_servers" in configObj && typeof configObj.context_servers === "object" && configObj.context_servers !== null) {
187
+ const servers = configObj.context_servers;
188
+ return "snapback" in servers || "snapback-zed" in servers;
189
+ }
174
190
  if ("mcpServers" in configObj && typeof configObj.mcpServers === "object" && configObj.mcpServers !== null) {
175
191
  const servers = configObj.mcpServers;
176
- return "snapback" in servers;
192
+ return "snapback" in servers || `snapback-${format}` in servers;
177
193
  }
178
194
  return false;
179
195
  case "continue":
@@ -212,6 +228,64 @@ function readClientConfig(client) {
212
228
  }
213
229
  __name(readClientConfig, "readClientConfig");
214
230
  __name2(readClientConfig, "readClientConfig");
231
+ function detectWorkspaceConfig(workspaceRoot) {
232
+ const root = workspaceRoot || process.cwd();
233
+ const qoderConfig = join(root, ".qoder-mcp-config.json");
234
+ if (existsSync(qoderConfig)) {
235
+ try {
236
+ const content = readFileSync(qoderConfig, "utf-8");
237
+ if (content.includes("snapback")) {
238
+ return {
239
+ path: qoderConfig,
240
+ type: "qoder"
241
+ };
242
+ }
243
+ } catch {
244
+ }
245
+ }
246
+ const cursorConfig = join(root, ".cursor", "mcp.json");
247
+ if (existsSync(cursorConfig)) {
248
+ try {
249
+ const content = readFileSync(cursorConfig, "utf-8");
250
+ if (content.includes("snapback")) {
251
+ return {
252
+ path: cursorConfig,
253
+ type: "cursor"
254
+ };
255
+ }
256
+ } catch {
257
+ }
258
+ }
259
+ const vscodeConfig = join(root, ".vscode", "mcp.json");
260
+ if (existsSync(vscodeConfig)) {
261
+ try {
262
+ const content = readFileSync(vscodeConfig, "utf-8");
263
+ if (content.includes("snapback")) {
264
+ return {
265
+ path: vscodeConfig,
266
+ type: "vscode"
267
+ };
268
+ }
269
+ } catch {
270
+ }
271
+ }
272
+ const windsurfConfig = join(root, ".windsurf", "mcp.json");
273
+ if (existsSync(windsurfConfig)) {
274
+ try {
275
+ const content = readFileSync(windsurfConfig, "utf-8");
276
+ if (content.includes("snapback")) {
277
+ return {
278
+ path: windsurfConfig,
279
+ type: "windsurf"
280
+ };
281
+ }
282
+ } catch {
283
+ }
284
+ }
285
+ return null;
286
+ }
287
+ __name(detectWorkspaceConfig, "detectWorkspaceConfig");
288
+ __name2(detectWorkspaceConfig, "detectWorkspaceConfig");
215
289
  function getSnapbackConfigDir() {
216
290
  const isWindows = process.platform === "win32";
217
291
  if (isWindows) {
@@ -308,6 +382,90 @@ function resetIdentityCache() {
308
382
  }
309
383
  __name(resetIdentityCache, "resetIdentityCache");
310
384
  __name2(resetIdentityCache, "resetIdentityCache");
385
+ var execAsync = promisify(exec);
386
+ async function detectMCPProcesses() {
387
+ try {
388
+ const { stdout } = await execAsync('ps aux | grep -E "(mcp.*--stdio|--stdio.*mcp|uvx.*mcp-server|npx.*mcp|node.*mcp)" | grep -v grep', {
389
+ timeout: 5e3
390
+ });
391
+ const processes = parseProcessOutput(stdout);
392
+ const snapbackProcesses = processes.filter((p) => p.isSnapback);
393
+ return {
394
+ allProcesses: processes,
395
+ snapbackProcesses,
396
+ snapbackRunning: snapbackProcesses.length > 0,
397
+ totalCount: processes.length,
398
+ checkedAt: /* @__PURE__ */ new Date()
399
+ };
400
+ } catch {
401
+ return {
402
+ allProcesses: [],
403
+ snapbackProcesses: [],
404
+ snapbackRunning: false,
405
+ totalCount: 0,
406
+ checkedAt: /* @__PURE__ */ new Date()
407
+ };
408
+ }
409
+ }
410
+ __name(detectMCPProcesses, "detectMCPProcesses");
411
+ __name2(detectMCPProcesses, "detectMCPProcesses");
412
+ function parseProcessOutput(output) {
413
+ const lines = output.trim().split("\n").filter((line) => line.trim());
414
+ const processes = [];
415
+ for (const line of lines) {
416
+ const match = line.match(/^(\S+)\s+(\d+)\s+.*?\s+(.+)$/);
417
+ if (!match) {
418
+ continue;
419
+ }
420
+ const [, , pidStr, command] = match;
421
+ const pid = Number.parseInt(pidStr, 10);
422
+ if (Number.isNaN(pid)) {
423
+ continue;
424
+ }
425
+ const serverName = extractServerName(command);
426
+ const isSnapback = command.toLowerCase().includes("snapback");
427
+ processes.push({
428
+ pid,
429
+ command: command.trim(),
430
+ serverName,
431
+ isSnapback
432
+ });
433
+ }
434
+ return processes;
435
+ }
436
+ __name(parseProcessOutput, "parseProcessOutput");
437
+ __name2(parseProcessOutput, "parseProcessOutput");
438
+ function extractServerName(command) {
439
+ const patterns = [
440
+ // snapback mcp --stdio
441
+ /snapback[/\s]/i,
442
+ // mcp-server-fetch
443
+ /mcp-server-(\w+)/,
444
+ // @modelcontextprotocol/server-sequential-thinking
445
+ /server-(\w+)/,
446
+ // context7-mcp
447
+ /(\w+)-mcp/,
448
+ // fly mcp server
449
+ /fly.*mcp/i,
450
+ // supabase-mcp
451
+ /supabase-mcp/i
452
+ ];
453
+ for (const pattern of patterns) {
454
+ const match = command.match(pattern);
455
+ if (match) {
456
+ return match[1] || match[0];
457
+ }
458
+ }
459
+ return "mcp";
460
+ }
461
+ __name(extractServerName, "extractServerName");
462
+ __name2(extractServerName, "extractServerName");
463
+ async function isSnapbackMCPRunning() {
464
+ const health = await detectMCPProcesses();
465
+ return health.snapbackRunning;
466
+ }
467
+ __name(isSnapbackMCPRunning, "isSnapbackMCPRunning");
468
+ __name2(isSnapbackMCPRunning, "isSnapbackMCPRunning");
311
469
  function validateClientConfig(client) {
312
470
  const issues = [];
313
471
  if (!existsSync(client.configPath)) {
@@ -504,7 +662,15 @@ function validateSnapbackConfig(config, issues) {
504
662
  severity: "error",
505
663
  code: "MISSING_STDIO_ARG",
506
664
  message: "Args must include '--stdio' flag",
507
- fix: "Run: snap tools configure --force"
665
+ fix: "Run: snap mcp repair --client <name>"
666
+ });
667
+ }
668
+ if (config.args.includes("shim")) {
669
+ issues.push({
670
+ severity: "error",
671
+ code: "DEPRECATED_SHIM_COMMAND",
672
+ message: "Args contain deprecated 'shim' command - use '--stdio' instead",
673
+ fix: "Run: snap mcp repair --client <name>"
508
674
  });
509
675
  }
510
676
  if (!config.args.includes("--workspace")) {
@@ -623,8 +789,12 @@ function isCommandExecutable2(command) {
623
789
  }
624
790
  __name(isCommandExecutable2, "isCommandExecutable2");
625
791
  __name2(isCommandExecutable2, "isCommandExecutable");
792
+ var STDIO_ONLY_CLIENTS = /* @__PURE__ */ new Set([
793
+ "claude"
794
+ ]);
626
795
  function getSnapbackMCPConfig(options = {}) {
627
- const { apiKey, workspaceId, serverUrl, useNpx = false, useBinary = false, customCommand, additionalEnv, workspaceRoot, useLocalDev = false, localCliPath } = options;
796
+ const { apiKey, workspaceId, serverUrl, useBinary = false, customCommand, additionalEnv, workspaceRoot, useLocalDev = false, localCliPath, client } = options;
797
+ const useNpx = options.useNpx ?? (client ? STDIO_ONLY_CLIENTS.has(client) : false);
628
798
  const env = {
629
799
  ...additionalEnv
630
800
  };
@@ -773,6 +943,10 @@ function removeSnapbackConfig(client) {
773
943
  case "claude":
774
944
  case "cursor":
775
945
  case "windsurf":
946
+ case "cline":
947
+ case "roo-code":
948
+ case "gemini":
949
+ case "qoder":
776
950
  if (config.mcpServers?.[serverKey]) {
777
951
  delete config.mcpServers[serverKey];
778
952
  }
@@ -780,6 +954,28 @@ function removeSnapbackConfig(client) {
780
954
  delete config.mcpServers.snapback;
781
955
  }
782
956
  break;
957
+ case "vscode": {
958
+ const vscodeConfig = config;
959
+ const servers = vscodeConfig.servers;
960
+ if (servers?.[serverKey]) {
961
+ delete servers[serverKey];
962
+ }
963
+ if (servers?.snapback) {
964
+ delete servers.snapback;
965
+ }
966
+ break;
967
+ }
968
+ case "zed": {
969
+ const zedConfig = config;
970
+ const contextServers = zedConfig.context_servers;
971
+ if (contextServers?.[serverKey]) {
972
+ delete contextServers[serverKey];
973
+ }
974
+ if (contextServers?.snapback) {
975
+ delete contextServers.snapback;
976
+ }
977
+ break;
978
+ }
783
979
  case "continue": {
784
980
  const experimental = config.experimental;
785
981
  if (experimental?.modelContextProtocolServers) {
@@ -815,20 +1011,66 @@ function mergeConfig(existing, snapbackConfig, format) {
815
1011
  switch (format) {
816
1012
  case "claude":
817
1013
  case "cursor":
818
- case "windsurf":
819
- case "vscode":
820
1014
  case "cline":
821
1015
  case "roo-code":
822
1016
  case "gemini":
823
- case "zed":
1017
+ return {
1018
+ ...existing,
1019
+ mcpServers: {
1020
+ ...existing.mcpServers || {},
1021
+ [serverKey]: snapbackConfig
1022
+ }
1023
+ };
1024
+ case "windsurf":
1025
+ return {
1026
+ ...existing,
1027
+ mcpServers: {
1028
+ ...existing.mcpServers || {},
1029
+ [serverKey]: {
1030
+ ...snapbackConfig,
1031
+ disabled: false,
1032
+ alwaysAllow: []
1033
+ }
1034
+ }
1035
+ };
824
1036
  case "qoder":
825
1037
  return {
826
1038
  ...existing,
827
1039
  mcpServers: {
828
1040
  ...existing.mcpServers || {},
1041
+ [serverKey]: {
1042
+ type: "stdio",
1043
+ ...snapbackConfig
1044
+ }
1045
+ }
1046
+ };
1047
+ case "vscode": {
1048
+ const vscodeConfig = existing;
1049
+ const servers = vscodeConfig.servers || {};
1050
+ const { mcpServers: _, ...rest } = vscodeConfig;
1051
+ return {
1052
+ ...rest,
1053
+ servers: {
1054
+ ...servers,
1055
+ [serverKey]: {
1056
+ type: "stdio",
1057
+ ...snapbackConfig
1058
+ }
1059
+ }
1060
+ };
1061
+ }
1062
+ case "zed": {
1063
+ const zedConfig = existing;
1064
+ const contextServers = zedConfig.context_servers || {};
1065
+ const { mcpServers: _, ...rest } = zedConfig;
1066
+ return {
1067
+ ...rest,
1068
+ context_servers: {
1069
+ ...contextServers,
829
1070
  [serverKey]: snapbackConfig
830
1071
  }
831
1072
  };
1073
+ }
832
1074
  case "continue": {
833
1075
  const continueConfig = existing;
834
1076
  const experimental = continueConfig.experimental || {};
@@ -872,15 +1114,33 @@ function validateConfig(client) {
872
1114
  case "claude":
873
1115
  case "cursor":
874
1116
  case "windsurf":
875
- case "vscode":
876
1117
  case "cline":
877
1118
  case "roo-code":
878
1119
  case "gemini":
879
- case "zed":
880
1120
  case "qoder": {
881
1121
  const serverConfig = config.mcpServers?.[serverKey] || config.mcpServers?.snapback;
882
1122
  return Boolean(serverConfig?.command || serverConfig?.url);
883
1123
  }
1124
+ case "vscode": {
1125
+ const vscodeConfig = config;
1126
+ const servers = vscodeConfig.servers;
1127
+ const serverConfig = servers?.[serverKey] || servers?.snapback;
1128
+ if (typeof serverConfig === "object" && serverConfig !== null) {
1129
+ const cfg = serverConfig;
1130
+ return Boolean(cfg.command || cfg.url);
1131
+ }
1132
+ return false;
1133
+ }
1134
+ case "zed": {
1135
+ const zedConfig = config;
1136
+ const contextServers = zedConfig.context_servers;
1137
+ const serverConfig = contextServers?.[serverKey] || contextServers?.snapback;
1138
+ if (typeof serverConfig === "object" && serverConfig !== null) {
1139
+ const cfg = serverConfig;
1140
+ return Boolean(cfg.command || cfg.url);
1141
+ }
1142
+ return false;
1143
+ }
884
1144
  case "continue": {
885
1145
  const expCfg = config.experimental;
886
1146
  const srvs = expCfg?.modelContextProtocolServers;
@@ -1007,6 +1267,7 @@ function attemptFix(client, issue, _validation, options) {
1007
1267
  case "MISSING_ARGS":
1008
1268
  case "MISSING_MCP_ARG":
1009
1269
  case "MISSING_STDIO_ARG":
1270
+ case "DEPRECATED_SHIM_COMMAND":
1010
1271
  case "INVALID_URL":
1011
1272
  return performFullReconfiguration(client, options);
1012
1273
  case "COMMAND_NOT_EXECUTABLE": {
@@ -1072,7 +1333,8 @@ function performFullReconfiguration(client, options) {
1072
1333
  workspaceId: options.workspaceId,
1073
1334
  workspaceRoot,
1074
1335
  useLocalDev: true,
1075
- localCliPath: cliPath
1336
+ localCliPath: cliPath,
1337
+ client: client.format
1076
1338
  });
1077
1339
  const nodePath = resolveNodePath();
1078
1340
  console.error(`[MCP Repair] Using node path: ${nodePath}`);
@@ -1080,9 +1342,10 @@ function performFullReconfiguration(client, options) {
1080
1342
  mcpConfig = getSnapbackMCPConfig({
1081
1343
  apiKey: options.apiKey,
1082
1344
  workspaceId: options.workspaceId,
1083
- useLocalDev: false
1345
+ useLocalDev: false,
1346
+ client: client.format
1084
1347
  });
1085
- console.error("[MCP Repair] Using remote HTTP mode (CLI not found locally)");
1348
+ console.error("[MCP Repair] Using default mode (CLI not found locally)");
1086
1349
  }
1087
1350
  const writeResult = writeClientConfig(client, mcpConfig);
1088
1351
  if (writeResult.success) {
@@ -1155,6 +1418,6 @@ function findCliPath() {
1155
1418
  __name(findCliPath, "findCliPath");
1156
1419
  __name2(findCliPath, "findCliPath");
1157
1420
 
1158
- export { createManagedMetadata, detectAIClients, getClient, getClientConfigPath, getConfiguredClients, getOrCreateIdentity, getServerKey, getSnapbackConfigDir, getSnapbackMCPConfig, injectWorkspacePath, isCommandExecutable2, isOwnedByThisInstall, readClientConfig, removeSnapbackConfig, repairClientConfig, resetIdentityCache, resolveNodePath, validateClientConfig, validateConfig, validateWorkspacePath, writeClientConfig };
1159
- //# sourceMappingURL=chunk-KPETDXQO.js.map
1160
- //# sourceMappingURL=chunk-KPETDXQO.js.map
1421
+ export { createManagedMetadata, detectAIClients, detectMCPProcesses, detectWorkspaceConfig, getClient, getClientConfigPath, getConfiguredClients, getOrCreateIdentity, getServerKey, getSnapbackConfigDir, getSnapbackMCPConfig, injectWorkspacePath, isCommandExecutable2, isOwnedByThisInstall, isSnapbackMCPRunning, readClientConfig, removeSnapbackConfig, repairClientConfig, resetIdentityCache, resolveNodePath, validateClientConfig, validateConfig, validateWorkspacePath, writeClientConfig };
1422
+ //# sourceMappingURL=chunk-2TOJVUVJ.js.map
1423
+ //# sourceMappingURL=chunk-2TOJVUVJ.js.map