dlw-machine-setup 0.9.1 → 0.9.2

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/bin/installer.js +9 -5
  2. package/package.json +1 -1
package/bin/installer.js CHANGED
@@ -5240,7 +5240,10 @@ var red2 = (text) => `\x1B[31m${text}\x1B[0m`;
5240
5240
  var write_mcp_config_default = defineStep({
5241
5241
  name: "write-mcp-config",
5242
5242
  label: "Writing MCP configuration",
5243
- when: (ctx) => Object.keys(ctx.config.mcpConfig).length > 0,
5243
+ /* Claude Code registers servers via `claude mcp add` (run-mcp-install-commands),
5244
+ * so the project-scoped `.mcp.json` is redundant there. Cursor and GitHub
5245
+ * Copilot have no equivalent CLI — they still need their config file. */
5246
+ when: (ctx) => ctx.config.agent !== "claude-code" && Object.keys(ctx.config.mcpConfig).length > 0,
5244
5247
  execute: async (ctx) => {
5245
5248
  const filteredMcpConfig = getFilteredMcpConfig(ctx);
5246
5249
  const target = getAgentTarget(ctx.config.agent);
@@ -5369,23 +5372,24 @@ var run_mcp_install_commands_default = defineStep({
5369
5372
  },
5370
5373
  inverse: {
5371
5374
  label: "Unregistering MCP servers from Claude Code",
5372
- execute: async (raw) => {
5375
+ execute: async (raw, ctx) => {
5373
5376
  const rec = raw ?? {};
5374
5377
  const servers = rec.registeredServers ?? [];
5375
5378
  if (servers.length === 0) return { status: "skipped", detail: "nothing was registered" };
5376
5379
  if (!isClaudeCliAvailable()) {
5377
5380
  return {
5378
5381
  status: "skipped",
5379
- detail: "`claude` CLI not found \u2014 leftover global registrations: " + servers.join(", ")
5382
+ detail: "`claude` CLI not found \u2014 leftover registrations: " + servers.join(", ")
5380
5383
  };
5381
5384
  }
5382
5385
  const removed = [];
5383
5386
  const failed = [];
5384
5387
  for (const name of servers) {
5385
- const r = (0, import_child_process3.spawnSync)(`claude mcp remove ${name}`, {
5388
+ const r = (0, import_child_process3.spawnSync)(`claude mcp remove ${name} --scope project`, {
5386
5389
  shell: true,
5387
5390
  stdio: "pipe",
5388
- encoding: "utf-8"
5391
+ encoding: "utf-8",
5392
+ cwd: ctx.config.projectPath
5389
5393
  });
5390
5394
  if (r.status === 0) removed.push(name);
5391
5395
  else failed.push(name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlw-machine-setup",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "One-shot installer for The Machine toolchain",
5
5
  "bin": {
6
6
  "dlw-machine-setup": "bin/installer.js"