fullcourtdefense-cli 1.1.16 → 1.1.17

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.
@@ -893,10 +893,22 @@ async function installClaudeCodeMcpGatewayCommand(args, config) {
893
893
  const includeShieldKey = scope !== 'project' || Boolean(args.shieldKey);
894
894
  const commandArgs = buildGatewayCommandArgs(gatewayConfig, downstreamCommand, downstreamArgs, { includeShieldKey });
895
895
  const claudeArgs = ['mcp', 'add', '--scope', scope, '--transport', 'stdio', serverName, '--', nodeExe, ...commandArgs];
896
- const result = (0, child_process_1.spawnSync)('claude', claudeArgs, {
896
+ let result = (0, child_process_1.spawnSync)('claude', claudeArgs, {
897
897
  stdio: 'inherit',
898
898
  shell: process.platform === 'win32',
899
899
  });
900
+ if (result.status !== 0) {
901
+ const removeResult = (0, child_process_1.spawnSync)('claude', ['mcp', 'remove', '--scope', scope, serverName], {
902
+ stdio: 'ignore',
903
+ shell: process.platform === 'win32',
904
+ });
905
+ if (removeResult.status === 0) {
906
+ result = (0, child_process_1.spawnSync)('claude', claudeArgs, {
907
+ stdio: 'inherit',
908
+ shell: process.platform === 'win32',
909
+ });
910
+ }
911
+ }
900
912
  if (result.status === 0) {
901
913
  console.log(`AgentGuard MCP Gateway installed for Claude Code (${scope}).`);
902
914
  console.log(`Server: ${serverName}`);
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ const discover_1 = require("./commands/discover");
11
11
  const hook_1 = require("./commands/hook");
12
12
  const installCursorHook_1 = require("./commands/installCursorHook");
13
13
  const mcpGateway_1 = require("./commands/mcpGateway");
14
- const VERSION = '1.1.16';
14
+ const VERSION = '1.1.17';
15
15
  function parseArgs(argv) {
16
16
  const flags = {};
17
17
  let command = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullcourtdefense-cli",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Full Court Defense CLI — security scanning for AI agents from your terminal",
5
5
  "main": "dist/index.js",
6
6
  "bin": {