mcpick 0.0.24 → 0.0.25

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 (33) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +8 -2
  3. package/dist/{add-Qzd8i-5k.js → add-7mhUpbrt.js} +22 -35
  4. package/dist/{add-json-DGmsjB0O.js → add-json-BMM2L4hv.js} +18 -34
  5. package/dist/{backup-C7fvikFw.js → backup-C-YJmgps.js} +4 -4
  6. package/dist/{cache-D3jjh5dD.js → cache-BOYZhUF6.js} +4 -3
  7. package/dist/{cli-CZOlaqoZ.js → cli-sOeHH4CK.js} +22 -22
  8. package/dist/{clients-Bh93TGP4.js → clients-D5KAuQ5U.js} +3 -3
  9. package/dist/{clone-MI8jJhTz.js → clone-BRJA55js.js} +5 -5
  10. package/dist/{config-DE58Fik_.js → config-Bzh374VP.js} +4 -13
  11. package/dist/{dev-51esdZG9.js → dev-B-WlQSqY.js} +4 -4
  12. package/dist/{disable-csYAn2Vk.js → disable-Br0aVG3u.js} +18 -37
  13. package/dist/{enable-B5GbmhL-.js → enable-DUolKCEH.js} +18 -37
  14. package/dist/{get-DacRZmwv.js → get-D-6Cl_CO.js} +3 -3
  15. package/dist/{hooks-C_x49qap.js → hooks-BKPmZViU.js} +3 -3
  16. package/dist/index.js +571 -505
  17. package/dist/{list-BeBtsiae.js → list-DMcaHDfM.js} +4 -4
  18. package/dist/{marketplace-BDC2YtvT.js → marketplace-DTW7Ys8k.js} +4 -4
  19. package/dist/mutation-ukRPw3qM.js +19 -0
  20. package/dist/{output-HtT5HCof.js → output-BS1TMOWt.js} +1 -1
  21. package/dist/{plugin-cache-DmLbh89d.js → plugin-cache-Dw1I2YuO.js} +10 -3
  22. package/dist/{plugins-Bkw-SKkZ.js → plugins-BzLD4og0.js} +4 -4
  23. package/dist/profile-CmIWUJH_.js +163 -0
  24. package/dist/{reload-Bl1mYK1I.js → reload-Di28s_rY.js} +2 -2
  25. package/dist/{remove-BSHgva79.js → remove-B32EuYRC.js} +18 -33
  26. package/dist/{reset-project-choices-BNLus9J9.js → reset-project-choices-DX4TnZ2i.js} +3 -3
  27. package/dist/{restore-YisgARhc.js → restore-ByS4xi0y.js} +5 -5
  28. package/dist/{rollback-GR1RkpXW.js → rollback-DdDJrA8y.js} +3 -3
  29. package/dist/{skills-rDTDqqZA.js → skills-pvyQ17XU.js} +3 -3
  30. package/dist/{validation-xMlbgGCF.js → validation-CfPAjPJ5.js} +21 -2
  31. package/package.json +1 -1
  32. package/dist/dry-run-XQ32fxPT.js +0 -20
  33. package/dist/profile-DwJTVXiz.js +0 -161
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # mcpick
2
2
 
3
+ ## 0.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - dd735be: Migrate server registry storage to portable versioned MCP
8
+ server entries with legacy compatibility.
9
+ - 0a6cc35: Add subprocess integration coverage for built CLI routing,
10
+ mutations, rollback, errors, and redaction.
11
+ - efed902: Remove unsupported dry-run functionality and reframe
12
+ mutation safety around observability and rollback metadata.
13
+ - 6adad04: Preserve disabled plugin hooks during cache clear by
14
+ re-disabling restored marketplace hook definitions.
15
+ - 6ff5070: Align TUI client picker defaults with reverse-sorted
16
+ visible client ordering across flows.
17
+ - d723e32: Improve mutation output with config paths, backup metadata,
18
+ and structured adapter write results.
19
+ - 9f366cf: Save and apply portable MCP profiles across client
20
+ adapters.
21
+ - b2131bd: Align interactive profile load and save flows with
22
+ adapter-backed portable client profile services.
23
+
3
24
  ## 0.0.24
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -141,14 +141,20 @@ npx mcpick cache refresh
141
141
 
142
142
  ## Profiles and backups
143
143
 
144
- Profiles and backups currently preserve MCP server and Claude Code
145
- plugin state.
144
+ Profiles are portable MCP server snapshots. Claude Code plugin state
145
+ is preserved as optional Claude-specific profile metadata.
146
146
 
147
147
  ```bash
148
+ # Legacy Claude Code shortcuts still work
148
149
  npx mcpick --profile database
149
150
  npx mcpick --save-profile mysetup
150
151
  npx mcpick --list-profiles
151
152
 
153
+ # Save/load profiles for a specific MCP client
154
+ npx mcpick profile save work --client vscode --scope project
155
+ npx mcpick profile load work --client opencode --scope project
156
+ npx mcpick profile load work --client pi --scope user
157
+
152
158
  npx mcpick backup
153
159
  npx mcpick restore [file]
154
160
 
@@ -1,7 +1,7 @@
1
- import { n as validate_mcp_server } from "./validation-xMlbgGCF.js";
2
- import { G as build_command_preview, I as get_client_adapter, O as add_server_to_registry, P as add_client_server, R as preview_add_client_server, U as resolve_client_location, f as add_mcp_via_cli, p as build_add_args } from "./index.js";
3
- import { n as output, t as error } from "./output-HtT5HCof.js";
4
- import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
1
+ import { n as validate_mcp_server } from "./validation-CfPAjPJ5.js";
2
+ import { E as add_server_to_registry, L as resolve_client_location, M as add_client_server, P as get_client_adapter, p as add_mcp_via_cli } from "./index.js";
3
+ import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-ukRPw3qM.js";
4
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/cli/commands/add.ts
7
7
  var add_default = defineCommand({
@@ -57,11 +57,6 @@ var add_default = defineCommand({
57
57
  type: "string",
58
58
  description: "Exact config path when a client has multiple matching locations"
59
59
  },
60
- dryRun: {
61
- type: "boolean",
62
- description: "Preview changes without writing",
63
- default: false
64
- },
65
60
  json: {
66
61
  type: "boolean",
67
62
  description: "Output as JSON",
@@ -78,7 +73,7 @@ var add_default = defineCommand({
78
73
  const add_args = args;
79
74
  const portable = build_portable_server(add_args, transport);
80
75
  if (add_args.client && add_args.client !== "claude-code") {
81
- await add_to_client(add_args.client, portable, add_args.scope, add_args.location, add_args.json, add_args.dryRun ?? false);
76
+ await add_to_client(add_args.client, portable, add_args.scope, add_args.location, add_args.json);
82
77
  return;
83
78
  }
84
79
  const scope = add_args.scope || "local";
@@ -103,27 +98,22 @@ var add_default = defineCommand({
103
98
  } catch (err) {
104
99
  error(`Invalid server config: ${err instanceof Error ? err.message : "validation failed"}`);
105
100
  }
106
- if (add_args.dryRun) {
107
- print_dry_run(build_command_preview({
108
- operation: "add-server",
109
- client: "claude-code",
110
- scope,
111
- location: "Claude Code CLI + mcpick registry",
112
- command: ["claude", ...build_add_args(server, scope)]
113
- }), add_args.json);
114
- return;
115
- }
116
101
  await add_server_to_registry(server);
117
102
  const result = await add_mcp_via_cli(server, scope);
103
+ const mutation = claude_mutation_context("add", scope, [server.name]);
118
104
  if (add_args.json) output({
119
105
  added: server.name,
120
- client: "claude-code",
121
- scope,
106
+ ...mutation,
122
107
  cli: result.success,
123
108
  error: result.error
124
109
  }, true);
125
- else if (result.success) console.log(`Added '${server.name}' and enabled (scope: ${scope})`);
126
- else console.log(`Added '${server.name}' to registry but CLI failed: ${result.error}`);
110
+ else if (result.success) {
111
+ console.log(`Added '${server.name}' and enabled (scope: ${scope})`);
112
+ print_mutation_details(mutation);
113
+ } else {
114
+ console.log(`Added '${server.name}' to registry but CLI failed: ${result.error}`);
115
+ print_mutation_details(mutation);
116
+ }
127
117
  }
128
118
  });
129
119
  function build_portable_server(args, transport) {
@@ -144,7 +134,7 @@ function build_portable_server(args, transport) {
144
134
  if (args.description) server.description = args.description;
145
135
  return server;
146
136
  }
147
- async function add_to_client(client, server, scope, location_path, json, dry_run) {
137
+ async function add_to_client(client, server, scope, location_path, json) {
148
138
  const adapter = get_client_adapter(client);
149
139
  if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
150
140
  if (scope && ![
@@ -154,18 +144,15 @@ async function add_to_client(client, server, scope, location_path, json, dry_run
154
144
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
155
145
  try {
156
146
  const location = resolve_client_location(adapter, scope, location_path);
157
- if (dry_run) {
158
- print_dry_run(await preview_add_client_server(adapter, location, server), json);
159
- return;
160
- }
161
- await add_client_server(adapter, location, server);
147
+ const mutation = await add_client_server(adapter, location, server);
162
148
  if (json) output({
163
149
  added: server.name,
164
- client: adapter.id,
165
- scope: location.scope,
166
- location: location.path
150
+ ...mutation
167
151
  }, true);
168
- else console.log(`Added '${server.name}' (${adapter.id}:${location.scope})`);
152
+ else {
153
+ console.log(`Added '${server.name}' (${adapter.id}:${location.scope})`);
154
+ print_mutation_details(mutation);
155
+ }
169
156
  } catch (err) {
170
157
  error(err instanceof Error ? err.message : "Failed to add server");
171
158
  }
@@ -181,4 +168,4 @@ function parse_key_value_pairs(input) {
181
168
  //#endregion
182
169
  export { add_default as default };
183
170
 
184
- //# sourceMappingURL=add-Qzd8i-5k.js.map
171
+ //# sourceMappingURL=add-7mhUpbrt.js.map
@@ -1,6 +1,6 @@
1
- import { F as add_client_server_config, G as build_command_preview, I as get_client_adapter, U as resolve_client_location, m as build_add_json_args, x as mcp_add_json_via_cli, z as preview_add_client_server_config } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
3
- import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
1
+ import { L as resolve_client_location, N as add_client_server_config, P as get_client_adapter, y as mcp_add_json_via_cli } from "./index.js";
2
+ import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-ukRPw3qM.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/cli/commands/add-json.ts
6
6
  var add_json_default = defineCommand({
@@ -32,11 +32,6 @@ var add_json_default = defineCommand({
32
32
  type: "string",
33
33
  description: "Exact config path when a client has multiple matching locations"
34
34
  },
35
- dryRun: {
36
- type: "boolean",
37
- description: "Preview changes without writing",
38
- default: false
39
- },
40
35
  json: {
41
36
  type: "boolean",
42
37
  description: "Output as JSON",
@@ -52,7 +47,7 @@ var add_json_default = defineCommand({
52
47
  }
53
48
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) error("JSON configuration must be an object.");
54
49
  if (args.client && args.client !== "claude-code") {
55
- await add_json_to_client(args.client, args.name, parsed, args.scope, args.location, args.json, args.dryRun);
50
+ await add_json_to_client(args.client, args.name, parsed, args.scope, args.location, args.json);
56
51
  return;
57
52
  }
58
53
  const scope = args.scope || "local";
@@ -61,29 +56,21 @@ var add_json_default = defineCommand({
61
56
  "project",
62
57
  "user"
63
58
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
64
- if (args.dryRun) {
65
- print_dry_run(build_command_preview({
66
- operation: "add-json",
67
- client: "claude-code",
68
- scope,
69
- location: "Claude Code CLI",
70
- command: ["claude", ...build_add_json_args(args.name, args.config, scope)]
71
- }), args.json);
72
- return;
73
- }
74
59
  const result = await mcp_add_json_via_cli(args.name, args.config, scope);
60
+ const mutation = claude_mutation_context("add", scope, [args.name]);
75
61
  if (args.json) output({
76
62
  added: args.name,
77
- client: "claude-code",
78
- scope,
63
+ ...mutation,
79
64
  success: result.success,
80
65
  error: result.error
81
66
  }, true);
82
- else if (result.success) console.log(`Added '${args.name}' from JSON (scope: ${scope})`);
83
- else error(result.error || "Unknown error");
67
+ else if (result.success) {
68
+ console.log(`Added '${args.name}' from JSON (scope: ${scope})`);
69
+ print_mutation_details(mutation);
70
+ } else error(result.error || "Unknown error");
84
71
  }
85
72
  });
86
- async function add_json_to_client(client, name, config, scope, location_path, json, dry_run) {
73
+ async function add_json_to_client(client, name, config, scope, location_path, json) {
87
74
  const adapter = get_client_adapter(client);
88
75
  if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
89
76
  if (scope && ![
@@ -93,18 +80,15 @@ async function add_json_to_client(client, name, config, scope, location_path, js
93
80
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
94
81
  try {
95
82
  const location = resolve_client_location(adapter, scope, location_path);
96
- if (dry_run) {
97
- print_dry_run(await preview_add_client_server_config(adapter, location, name, config), json);
98
- return;
99
- }
100
- await add_client_server_config(adapter, location, name, config);
83
+ const mutation = await add_client_server_config(adapter, location, name, config);
101
84
  if (json) output({
102
85
  added: name,
103
- client: adapter.id,
104
- scope: location.scope,
105
- location: location.path
86
+ ...mutation
106
87
  }, true);
107
- else console.log(`Added '${name}' from JSON (${adapter.id}:${location.scope})`);
88
+ else {
89
+ console.log(`Added '${name}' from JSON (${adapter.id}:${location.scope})`);
90
+ print_mutation_details(mutation);
91
+ }
108
92
  } catch (err) {
109
93
  error(err instanceof Error ? err.message : "Failed to add server");
110
94
  }
@@ -112,4 +96,4 @@ async function add_json_to_client(client, name, config, scope, location_path, js
112
96
  //#endregion
113
97
  export { add_json_default as default };
114
98
 
115
- //# sourceMappingURL=add-json-DGmsjB0O.js.map
99
+ //# sourceMappingURL=add-json-BMM2L4hv.js.map
@@ -1,7 +1,7 @@
1
1
  import { m as get_plugin_backup_filename, n as get_backup_filename, r as get_backups_dir, t as ensure_directory_exists } from "./paths-BPISiJi4.js";
2
- import { s as read_claude_config } from "./config-DE58Fik_.js";
3
- import { Z as read_claude_settings } from "./index.js";
4
- import { n as output } from "./output-HtT5HCof.js";
2
+ import { o as read_claude_config } from "./config-Bzh374VP.js";
3
+ import { U as read_claude_settings } from "./index.js";
4
+ import { n as output } from "./output-BS1TMOWt.js";
5
5
  import { readdir, unlink, writeFile } from "node:fs/promises";
6
6
  import { join } from "node:path";
7
7
  import { defineCommand } from "citty";
@@ -61,4 +61,4 @@ var backup_default = defineCommand({
61
61
  //#endregion
62
62
  export { backup_default as default };
63
63
 
64
- //# sourceMappingURL=backup-C7fvikFw.js.map
64
+ //# sourceMappingURL=backup-C-YJmgps.js.map
@@ -1,5 +1,5 @@
1
- import { a as list_linked_plugins, c as read_installed_plugins, d as refresh_all_marketplaces, f as scan_all_cache_keys, i as link_local_plugin, n as clear_plugin_caches, p as unlink_local_plugin, r as get_cached_plugins_info, t as clean_orphaned_versions } from "./plugin-cache-DmLbh89d.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { a as list_linked_plugins, c as read_installed_plugins, d as refresh_all_marketplaces, f as scan_all_cache_keys, i as link_local_plugin, n as clear_plugin_caches, p as unlink_local_plugin, r as get_cached_plugins_info, t as clean_orphaned_versions } from "./plugin-cache-Dw1I2YuO.js";
2
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
3
3
  import { defineCommand } from "citty";
4
4
  var cache_default = defineCommand({
5
5
  meta: {
@@ -82,6 +82,7 @@ var cache_default = defineCommand({
82
82
  if (args.json) output(result, true);
83
83
  else {
84
84
  for (const key of result.cleared) console.log(`Cleared: ${key}`);
85
+ if (result.redisabledHooks?.success) console.log(`Re-disabled restored hooks: ${result.redisabledHooks.success}`);
85
86
  for (const err of result.errors) console.error(`Error: ${err}`);
86
87
  if (result.cleared.length > 0) console.log("\nRun /reload-plugins in Claude Code or restart your session.");
87
88
  }
@@ -223,4 +224,4 @@ var cache_default = defineCommand({
223
224
  //#endregion
224
225
  export { cache_default as default };
225
226
 
226
- //# sourceMappingURL=cache-D3jjh5dD.js.map
227
+ //# sourceMappingURL=cache-BOYZhUF6.js.map
@@ -6,27 +6,27 @@ const main = defineCommand({
6
6
  description: "Vendor-neutral MCP configuration manager with first-class Claude Code support"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-BeBtsiae.js").then((m) => m.default),
10
- enable: () => import("./enable-B5GbmhL-.js").then((m) => m.default),
11
- disable: () => import("./disable-csYAn2Vk.js").then((m) => m.default),
12
- clients: () => import("./clients-Bh93TGP4.js").then((m) => m.default),
13
- remove: () => import("./remove-BSHgva79.js").then((m) => m.default),
14
- add: () => import("./add-Qzd8i-5k.js").then((m) => m.default),
15
- "add-json": () => import("./add-json-DGmsjB0O.js").then((m) => m.default),
16
- clone: () => import("./clone-MI8jJhTz.js").then((m) => m.default),
17
- get: () => import("./get-DacRZmwv.js").then((m) => m.default),
18
- "reset-project-choices": () => import("./reset-project-choices-BNLus9J9.js").then((m) => m.default),
19
- backup: () => import("./backup-C7fvikFw.js").then((m) => m.default),
20
- restore: () => import("./restore-YisgARhc.js").then((m) => m.default),
21
- profile: () => import("./profile-DwJTVXiz.js").then((m) => m.default),
22
- skills: () => import("./skills-rDTDqqZA.js").then((m) => m.default),
23
- plugins: () => import("./plugins-Bkw-SKkZ.js").then((m) => m.default),
24
- hooks: () => import("./hooks-C_x49qap.js").then((m) => m.default),
25
- cache: () => import("./cache-D3jjh5dD.js").then((m) => m.default),
26
- dev: () => import("./dev-51esdZG9.js").then((m) => m.default),
27
- marketplace: () => import("./marketplace-BDC2YtvT.js").then((m) => m.default),
28
- reload: () => import("./reload-Bl1mYK1I.js").then((m) => m.default),
29
- rollback: () => import("./rollback-GR1RkpXW.js").then((m) => m.default)
9
+ list: () => import("./list-DMcaHDfM.js").then((m) => m.default),
10
+ enable: () => import("./enable-DUolKCEH.js").then((m) => m.default),
11
+ disable: () => import("./disable-Br0aVG3u.js").then((m) => m.default),
12
+ clients: () => import("./clients-D5KAuQ5U.js").then((m) => m.default),
13
+ remove: () => import("./remove-B32EuYRC.js").then((m) => m.default),
14
+ add: () => import("./add-7mhUpbrt.js").then((m) => m.default),
15
+ "add-json": () => import("./add-json-BMM2L4hv.js").then((m) => m.default),
16
+ clone: () => import("./clone-BRJA55js.js").then((m) => m.default),
17
+ get: () => import("./get-D-6Cl_CO.js").then((m) => m.default),
18
+ "reset-project-choices": () => import("./reset-project-choices-DX4TnZ2i.js").then((m) => m.default),
19
+ backup: () => import("./backup-C-YJmgps.js").then((m) => m.default),
20
+ restore: () => import("./restore-ByS4xi0y.js").then((m) => m.default),
21
+ profile: () => import("./profile-CmIWUJH_.js").then((m) => m.default),
22
+ skills: () => import("./skills-pvyQ17XU.js").then((m) => m.default),
23
+ plugins: () => import("./plugins-BzLD4og0.js").then((m) => m.default),
24
+ hooks: () => import("./hooks-BKPmZViU.js").then((m) => m.default),
25
+ cache: () => import("./cache-BOYZhUF6.js").then((m) => m.default),
26
+ dev: () => import("./dev-B-WlQSqY.js").then((m) => m.default),
27
+ marketplace: () => import("./marketplace-DTW7Ys8k.js").then((m) => m.default),
28
+ reload: () => import("./reload-Di28s_rY.js").then((m) => m.default),
29
+ rollback: () => import("./rollback-DdDJrA8y.js").then((m) => m.default)
30
30
  }
31
31
  });
32
32
  /**
@@ -109,4 +109,4 @@ const run = () => runMain(main, { showUsage: show_usage_with_examples });
109
109
  //#endregion
110
110
  export { run };
111
111
 
112
- //# sourceMappingURL=cli-CZOlaqoZ.js.map
112
+ //# sourceMappingURL=cli-sOeHH4CK.js.map
@@ -1,5 +1,5 @@
1
- import { L as list_client_locations } from "./index.js";
2
- import { n as output } from "./output-HtT5HCof.js";
1
+ import { F as list_client_locations } from "./index.js";
2
+ import { n as output } from "./output-BS1TMOWt.js";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/cli/commands/clients.ts
5
5
  var clients_default = defineCommand({
@@ -27,4 +27,4 @@ var clients_default = defineCommand({
27
27
  //#endregion
28
28
  export { clients_default as default };
29
29
 
30
- //# sourceMappingURL=clients-Bh93TGP4.js.map
30
+ //# sourceMappingURL=clients-D5KAuQ5U.js.map
@@ -1,8 +1,8 @@
1
- import { n as validate_mcp_server } from "./validation-xMlbgGCF.js";
2
- import { i as find_server_in_scope, r as detect_server_scope } from "./config-DE58Fik_.js";
1
+ import { n as validate_mcp_server } from "./validation-CfPAjPJ5.js";
2
+ import { n as detect_server_scope, r as find_server_in_scope } from "./config-Bzh374VP.js";
3
3
  import { n as redact_server } from "./redact-wBMtzbno.js";
4
- import { O as add_server_to_registry, f as add_mcp_via_cli } from "./index.js";
5
- import { n as output, t as error } from "./output-HtT5HCof.js";
4
+ import { E as add_server_to_registry, p as add_mcp_via_cli } from "./index.js";
5
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/cli/commands/clone.ts
8
8
  var clone_default = defineCommand({
@@ -84,4 +84,4 @@ var clone_default = defineCommand({
84
84
  //#endregion
85
85
  export { clone_default as default };
86
86
 
87
- //# sourceMappingURL=clone-MI8jJhTz.js.map
87
+ //# sourceMappingURL=clone-BRJA55js.js.map
@@ -1,11 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
2
2
  import { i as get_claude_config_path, o as get_current_project_path, v as get_project_mcp_json_path } from "./paths-BPISiJi4.js";
3
- import { t as validate_claude_config } from "./validation-xMlbgGCF.js";
4
- import { et as atomic_json_write } from "./index.js";
3
+ import { t as validate_claude_config } from "./validation-CfPAjPJ5.js";
4
+ import { K as atomic_json_write } from "./index.js";
5
5
  import { access, readFile } from "node:fs/promises";
6
6
  //#region src/core/config.ts
7
7
  var config_exports = /* @__PURE__ */ __exportAll({
8
- create_config_from_servers: () => create_config_from_servers,
9
8
  detect_server_scope: () => detect_server_scope,
10
9
  find_server_in_scope: () => find_server_in_scope,
11
10
  get_enabled_servers: () => get_enabled_servers,
@@ -37,14 +36,6 @@ function get_enabled_servers(config) {
37
36
  name
38
37
  }));
39
38
  }
40
- function create_config_from_servers(selected_servers) {
41
- const mcp_servers = {};
42
- selected_servers.forEach((server) => {
43
- const { name, ...server_config } = server;
44
- mcp_servers[name] = server_config;
45
- });
46
- return { mcpServers: mcp_servers };
47
- }
48
39
  /**
49
40
  * Find a server's full config in a specific scope.
50
41
  */
@@ -171,6 +162,6 @@ async function get_enabled_servers_for_scope(scope) {
171
162
  }
172
163
  }
173
164
  //#endregion
174
- export { get_enabled_servers as a, write_claude_config as c, find_server_in_scope as i, create_config_from_servers as n, get_enabled_servers_for_scope as o, detect_server_scope as r, read_claude_config as s, config_exports as t };
165
+ export { get_enabled_servers_for_scope as a, get_enabled_servers as i, detect_server_scope as n, read_claude_config as o, find_server_in_scope as r, write_claude_config as s, config_exports as t };
175
166
 
176
- //# sourceMappingURL=config-DE58Fik_.js.map
167
+ //# sourceMappingURL=config-Bzh374VP.js.map
@@ -1,8 +1,8 @@
1
1
  import { i as get_claude_config_path, o as get_current_project_path, s as get_dev_overrides_path, v as get_project_mcp_json_path } from "./paths-BPISiJi4.js";
2
- import { i as find_server_in_scope, r as detect_server_scope } from "./config-DE58Fik_.js";
2
+ import { n as detect_server_scope, r as find_server_in_scope } from "./config-Bzh374VP.js";
3
3
  import { r as redact_server_base } from "./redact-wBMtzbno.js";
4
- import { et as atomic_json_write } from "./index.js";
5
- import { n as output, t as error } from "./output-HtT5HCof.js";
4
+ import { K as atomic_json_write } from "./index.js";
5
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
6
6
  import { readFile } from "node:fs/promises";
7
7
  import { defineCommand } from "citty";
8
8
  //#region src/core/dev-override.ts
@@ -262,4 +262,4 @@ var dev_default = defineCommand({
262
262
  //#endregion
263
263
  export { dev_default as default };
264
264
 
265
- //# sourceMappingURL=dev-51esdZG9.js.map
265
+ //# sourceMappingURL=dev-B-WlQSqY.js.map
@@ -1,6 +1,6 @@
1
- import { G as build_command_preview, I as get_client_adapter, U as resolve_client_location, V as preview_set_client_enabled_servers, W as set_client_server_enabled, h as build_remove_args, k as get_all_available_servers, w as remove_mcp_via_cli } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
3
- import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
1
+ import { D as get_all_available_servers, L as resolve_client_location, P as get_client_adapter, R as set_client_server_enabled, S as remove_mcp_via_cli } from "./index.js";
2
+ import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-ukRPw3qM.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/cli/commands/disable.ts
6
6
  var disable_default = defineCommand({
@@ -27,11 +27,6 @@ var disable_default = defineCommand({
27
27
  type: "string",
28
28
  description: "Exact config path when a client has multiple matching locations"
29
29
  },
30
- dryRun: {
31
- type: "boolean",
32
- description: "Preview changes without writing",
33
- default: false
34
- },
35
30
  json: {
36
31
  type: "boolean",
37
32
  description: "Output as JSON",
@@ -40,7 +35,7 @@ var disable_default = defineCommand({
40
35
  },
41
36
  async run({ args }) {
42
37
  if (args.client && args.client !== "claude-code") {
43
- await disable_client_server(args.client, args.server, args.scope, args.location, args.json, args.dryRun);
38
+ await disable_client_server(args.client, args.server, args.scope, args.location, args.json);
44
39
  return;
45
40
  }
46
41
  const scope = args.scope || "local";
@@ -50,27 +45,20 @@ var disable_default = defineCommand({
50
45
  "user"
51
46
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
52
47
  await get_all_available_servers();
53
- if (args.dryRun) {
54
- print_dry_run(build_command_preview({
55
- operation: "disable-server",
56
- client: "claude-code",
57
- scope,
58
- location: "Claude Code CLI",
59
- command: ["claude", ...build_remove_args(args.server, scope)]
60
- }), args.json);
61
- return;
62
- }
63
48
  const result = await remove_mcp_via_cli(args.server, scope);
64
49
  if (!result.success) error(result.error || "Failed to disable server");
50
+ const mutation = claude_mutation_context("disable", scope, [args.server]);
65
51
  if (args.json) output({
66
52
  disabled: args.server,
67
- client: "claude-code",
68
- scope
53
+ ...mutation
69
54
  }, true);
70
- else console.log(`Disabled '${args.server}' (scope: ${scope})`);
55
+ else {
56
+ console.log(`Disabled '${args.server}' (scope: ${scope})`);
57
+ print_mutation_details(mutation);
58
+ }
71
59
  }
72
60
  });
73
- async function disable_client_server(client, server, scope, location_path, json, dry_run) {
61
+ async function disable_client_server(client, server, scope, location_path, json) {
74
62
  const adapter = get_client_adapter(client);
75
63
  if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
76
64
  if (scope && ![
@@ -80,22 +68,15 @@ async function disable_client_server(client, server, scope, location_path, json,
80
68
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
81
69
  try {
82
70
  const location = resolve_client_location(adapter, scope, location_path);
83
- const servers = await adapter.readLocation(location);
84
- const enabled_names = new Set(servers.filter((candidate) => candidate.disabled !== true).map((candidate) => candidate.name));
85
- enabled_names.delete(server);
86
- if (dry_run) {
87
- print_dry_run(await preview_set_client_enabled_servers(adapter, location, [...enabled_names]), json);
88
- return;
89
- }
90
- const enabled_count = await set_client_server_enabled(adapter, location, server, false);
71
+ const mutation = await set_client_server_enabled(adapter, location, server, false);
91
72
  if (json) output({
92
73
  disabled: server,
93
- client: adapter.id,
94
- scope: location.scope,
95
- location: location.path,
96
- enabledCount: enabled_count
74
+ ...mutation
97
75
  }, true);
98
- else console.log(`Disabled '${server}' (${adapter.id}:${location.scope})`);
76
+ else {
77
+ console.log(`Disabled '${server}' (${adapter.id}:${location.scope})`);
78
+ print_mutation_details(mutation);
79
+ }
99
80
  } catch (err) {
100
81
  error(err instanceof Error ? err.message : "Failed to disable server");
101
82
  }
@@ -103,4 +84,4 @@ async function disable_client_server(client, server, scope, location_path, json,
103
84
  //#endregion
104
85
  export { disable_default as default };
105
86
 
106
- //# sourceMappingURL=disable-csYAn2Vk.js.map
87
+ //# sourceMappingURL=disable-Br0aVG3u.js.map
@@ -1,6 +1,6 @@
1
- import { G as build_command_preview, I as get_client_adapter, U as resolve_client_location, V as preview_set_client_enabled_servers, W as set_client_server_enabled, f as add_mcp_via_cli, k as get_all_available_servers, p as build_add_args } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
3
- import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
1
+ import { D as get_all_available_servers, L as resolve_client_location, P as get_client_adapter, R as set_client_server_enabled, p as add_mcp_via_cli } from "./index.js";
2
+ import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-ukRPw3qM.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/cli/commands/enable.ts
6
6
  var enable_default = defineCommand({
@@ -27,11 +27,6 @@ var enable_default = defineCommand({
27
27
  type: "string",
28
28
  description: "Exact config path when a client has multiple matching locations"
29
29
  },
30
- dryRun: {
31
- type: "boolean",
32
- description: "Preview changes without writing",
33
- default: false
34
- },
35
30
  json: {
36
31
  type: "boolean",
37
32
  description: "Output as JSON",
@@ -40,7 +35,7 @@ var enable_default = defineCommand({
40
35
  },
41
36
  async run({ args }) {
42
37
  if (args.client && args.client !== "claude-code") {
43
- await enable_client_server(args.client, args.server, args.scope, args.location, args.json, args.dryRun);
38
+ await enable_client_server(args.client, args.server, args.scope, args.location, args.json);
44
39
  return;
45
40
  }
46
41
  const scope = args.scope || "local";
@@ -51,27 +46,20 @@ var enable_default = defineCommand({
51
46
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
52
47
  const server = (await get_all_available_servers()).find((s) => s.name === args.server);
53
48
  if (!server) error(`Server '${args.server}' not found in registry. Run 'mcpick list' to see available servers.`);
54
- if (args.dryRun) {
55
- print_dry_run(build_command_preview({
56
- operation: "enable-server",
57
- client: "claude-code",
58
- scope,
59
- location: "Claude Code CLI",
60
- command: ["claude", ...build_add_args(server, scope)]
61
- }), args.json);
62
- return;
63
- }
64
49
  const result = await add_mcp_via_cli(server, scope);
65
50
  if (!result.success) error(result.error || "Failed to enable server");
51
+ const mutation = claude_mutation_context("enable", scope, [server.name]);
66
52
  if (args.json) output({
67
53
  enabled: server.name,
68
- client: "claude-code",
69
- scope
54
+ ...mutation
70
55
  }, true);
71
- else console.log(`Enabled '${server.name}' (scope: ${scope})`);
56
+ else {
57
+ console.log(`Enabled '${server.name}' (scope: ${scope})`);
58
+ print_mutation_details(mutation);
59
+ }
72
60
  }
73
61
  });
74
- async function enable_client_server(client, server, scope, location_path, json, dry_run) {
62
+ async function enable_client_server(client, server, scope, location_path, json) {
75
63
  const adapter = get_client_adapter(client);
76
64
  if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
77
65
  if (scope && ![
@@ -81,22 +69,15 @@ async function enable_client_server(client, server, scope, location_path, json,
81
69
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
82
70
  try {
83
71
  const location = resolve_client_location(adapter, scope, location_path);
84
- const servers = await adapter.readLocation(location);
85
- const enabled_names = new Set(servers.filter((candidate) => candidate.disabled !== true).map((candidate) => candidate.name));
86
- enabled_names.add(server);
87
- if (dry_run) {
88
- print_dry_run(await preview_set_client_enabled_servers(adapter, location, [...enabled_names]), json);
89
- return;
90
- }
91
- const enabled_count = await set_client_server_enabled(adapter, location, server, true);
72
+ const mutation = await set_client_server_enabled(adapter, location, server, true);
92
73
  if (json) output({
93
74
  enabled: server,
94
- client: adapter.id,
95
- scope: location.scope,
96
- location: location.path,
97
- enabledCount: enabled_count
75
+ ...mutation
98
76
  }, true);
99
- else console.log(`Enabled '${server}' (${adapter.id}:${location.scope})`);
77
+ else {
78
+ console.log(`Enabled '${server}' (${adapter.id}:${location.scope})`);
79
+ print_mutation_details(mutation);
80
+ }
100
81
  } catch (err) {
101
82
  error(err instanceof Error ? err.message : "Failed to enable server");
102
83
  }
@@ -104,4 +85,4 @@ async function enable_client_server(client, server, scope, location_path, json,
104
85
  //#endregion
105
86
  export { enable_default as default };
106
87
 
107
- //# sourceMappingURL=enable-B5GbmhL-.js.map
88
+ //# sourceMappingURL=enable-DUolKCEH.js.map