@artyfacts/claude 1.3.12 → 1.3.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.
package/dist/cli.js CHANGED
@@ -874,10 +874,12 @@ function addMcpServer(options) {
874
874
  if (result.status === 0) {
875
875
  return { success: true };
876
876
  } else {
877
- return {
878
- success: false,
879
- error: result.stderr || result.stdout || `Exit code ${result.status}`
880
- };
877
+ const error = result.stderr || result.stdout || `Exit code ${result.status}`;
878
+ if (error.includes("already exists")) {
879
+ console.log(`[MCP] Server ${name} already configured - treating as success`);
880
+ return { success: true, alreadyExists: true };
881
+ }
882
+ return { success: false, error };
881
883
  }
882
884
  }
883
885
  var McpHandler = class {
@@ -907,7 +909,7 @@ var McpHandler = class {
907
909
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
908
910
  }
909
911
  console.log(`[MCP] Added ${serverName} \u2192 ${oauthServer.url}`);
910
- console.log(`[MCP] OAuth will prompt when you use ${platform} tools`);
912
+ console.log(`[MCP] OAuth will prompt on first use (one-time login)`);
911
913
  } else {
912
914
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];
913
915
  if (!configBuilder) {
@@ -1291,7 +1293,7 @@ async function runAgent(options) {
1291
1293
  onConfigured: (connectionId, platform) => {
1292
1294
  console.log(`
1293
1295
  \u{1F527} [MCP] Configured ${platform} connection: ${connectionId}`);
1294
- console.log(" \u{1F4A1} Try using the tools now - OAuth will prompt when needed");
1296
+ console.log(" \u{1F4A1} Try using the tools now - OAuth prompts once on first use");
1295
1297
  },
1296
1298
  onError: (error, connectionId) => {
1297
1299
  console.error(`
package/dist/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getCredentials,
8
8
  loadCredentials,
9
9
  promptForApiKey
10
- } from "./chunk-KJ6B3YEC.mjs";
10
+ } from "./chunk-CSODKZR3.mjs";
11
11
 
12
12
  // src/cli.ts
13
13
  import { Command } from "commander";
@@ -287,7 +287,7 @@ async function runAgent(options) {
287
287
  onConfigured: (connectionId, platform) => {
288
288
  console.log(`
289
289
  \u{1F527} [MCP] Configured ${platform} connection: ${connectionId}`);
290
- console.log(" \u{1F4A1} Try using the tools now - OAuth will prompt when needed");
290
+ console.log(" \u{1F4A1} Try using the tools now - OAuth prompts once on first use");
291
291
  },
292
292
  onError: (error, connectionId) => {
293
293
  console.error(`
package/dist/index.js CHANGED
@@ -6067,10 +6067,12 @@ function addMcpServer(options) {
6067
6067
  if (result.status === 0) {
6068
6068
  return { success: true };
6069
6069
  } else {
6070
- return {
6071
- success: false,
6072
- error: result.stderr || result.stdout || `Exit code ${result.status}`
6073
- };
6070
+ const error = result.stderr || result.stdout || `Exit code ${result.status}`;
6071
+ if (error.includes("already exists")) {
6072
+ console.log(`[MCP] Server ${name} already configured - treating as success`);
6073
+ return { success: true, alreadyExists: true };
6074
+ }
6075
+ return { success: false, error };
6074
6076
  }
6075
6077
  }
6076
6078
  var McpHandler = class {
@@ -6100,7 +6102,7 @@ var McpHandler = class {
6100
6102
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
6101
6103
  }
6102
6104
  console.log(`[MCP] Added ${serverName} \u2192 ${oauthServer.url}`);
6103
- console.log(`[MCP] OAuth will prompt when you use ${platform} tools`);
6105
+ console.log(`[MCP] OAuth will prompt on first use (one-time login)`);
6104
6106
  } else {
6105
6107
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];
6106
6108
  if (!configBuilder) {
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  promptForApiKey,
15
15
  runDeviceAuth,
16
16
  saveCredentials
17
- } from "./chunk-KJ6B3YEC.mjs";
17
+ } from "./chunk-CSODKZR3.mjs";
18
18
 
19
19
  // node_modules/@anthropic-ai/sdk/internal/tslib.mjs
20
20
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artyfacts/claude",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
4
4
  "description": "Claude adapter for Artyfacts - Execute tasks using Claude Code CLI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/cli.ts CHANGED
@@ -438,7 +438,7 @@ async function runAgent(options: {
438
438
  baseUrl: options.baseUrl,
439
439
  onConfigured: (connectionId, platform) => {
440
440
  console.log(`\nšŸ”§ [MCP] Configured ${platform} connection: ${connectionId}`);
441
- console.log(' šŸ’” Try using the tools now - OAuth will prompt when needed');
441
+ console.log(' šŸ’” Try using the tools now - OAuth prompts once on first use');
442
442
  },
443
443
  onError: (error, connectionId) => {
444
444
  console.error(`\nāŒ [MCP] Failed to configure connection ${connectionId}:`, error.message);
package/src/mcp.ts CHANGED
@@ -102,7 +102,7 @@ function addMcpServer(options: {
102
102
  args?: string[];
103
103
  env?: Record<string, string>;
104
104
  scope?: 'local' | 'user' | 'project';
105
- }): { success: boolean; error?: string } {
105
+ }): { success: boolean; error?: string; alreadyExists?: boolean } {
106
106
  const { name, transport, url, command, args = [], env = {}, scope = 'user' } = options;
107
107
 
108
108
  const cliArgs = ['mcp', 'add', '-s', scope, '-t', transport];
@@ -135,10 +135,15 @@ function addMcpServer(options: {
135
135
  if (result.status === 0) {
136
136
  return { success: true };
137
137
  } else {
138
- return {
139
- success: false,
140
- error: result.stderr || result.stdout || `Exit code ${result.status}`,
141
- };
138
+ const error = result.stderr || result.stdout || `Exit code ${result.status}`;
139
+
140
+ // "Already exists" is not an error - the server is configured
141
+ if (error.includes('already exists')) {
142
+ console.log(`[MCP] Server ${name} already configured - treating as success`);
143
+ return { success: true, alreadyExists: true };
144
+ }
145
+
146
+ return { success: false, error };
142
147
  }
143
148
  }
144
149
 
@@ -181,7 +186,7 @@ export class McpHandler {
181
186
  }
182
187
 
183
188
  console.log(`[MCP] Added ${serverName} → ${oauthServer.url}`);
184
- console.log(`[MCP] OAuth will prompt when you use ${platform} tools`);
189
+ console.log(`[MCP] OAuth will prompt on first use (one-time login)`);
185
190
  } else {
186
191
  // Command-based MCP server - needs credentials
187
192
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];