@artyfacts/claude 1.3.11 → 1.3.13
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/chunk-4L6FPX5K.mjs +1005 -0
- package/dist/chunk-KJ6B3YEC.mjs +1003 -0
- package/dist/cli.js +13 -6
- package/dist/cli.mjs +1 -1
- package/dist/index.js +13 -6
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/mcp.ts +18 -7
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
|
-
|
|
878
|
-
|
|
879
|
-
|
|
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 {
|
|
@@ -960,8 +962,10 @@ var McpHandler = class {
|
|
|
960
962
|
* Update connection status in Artyfacts
|
|
961
963
|
*/
|
|
962
964
|
async updateConnectionStatus(connectionId, update) {
|
|
965
|
+
const url = `${this.config.baseUrl}/connections/${connectionId}`;
|
|
966
|
+
console.log(`[MCP] Updating connection ${connectionId} to status: ${update.status}`);
|
|
963
967
|
try {
|
|
964
|
-
const response = await fetch(
|
|
968
|
+
const response = await fetch(url, {
|
|
965
969
|
method: "PATCH",
|
|
966
970
|
headers: {
|
|
967
971
|
"Authorization": `Bearer ${this.config.apiKey}`,
|
|
@@ -970,7 +974,10 @@ var McpHandler = class {
|
|
|
970
974
|
body: JSON.stringify(update)
|
|
971
975
|
});
|
|
972
976
|
if (!response.ok) {
|
|
973
|
-
|
|
977
|
+
const body = await response.text();
|
|
978
|
+
console.error(`[MCP] Failed to update connection status: ${response.status} - ${body}`);
|
|
979
|
+
} else {
|
|
980
|
+
console.log(`[MCP] Connection ${connectionId} updated to ${update.status}`);
|
|
974
981
|
}
|
|
975
982
|
} catch (err) {
|
|
976
983
|
console.error("[MCP] Failed to update connection status:", err);
|
package/dist/cli.mjs
CHANGED
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
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
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 {
|
|
@@ -6153,8 +6155,10 @@ var McpHandler = class {
|
|
|
6153
6155
|
* Update connection status in Artyfacts
|
|
6154
6156
|
*/
|
|
6155
6157
|
async updateConnectionStatus(connectionId, update) {
|
|
6158
|
+
const url = `${this.config.baseUrl}/connections/${connectionId}`;
|
|
6159
|
+
console.log(`[MCP] Updating connection ${connectionId} to status: ${update.status}`);
|
|
6156
6160
|
try {
|
|
6157
|
-
const response = await fetch(
|
|
6161
|
+
const response = await fetch(url, {
|
|
6158
6162
|
method: "PATCH",
|
|
6159
6163
|
headers: {
|
|
6160
6164
|
"Authorization": `Bearer ${this.config.apiKey}`,
|
|
@@ -6163,7 +6167,10 @@ var McpHandler = class {
|
|
|
6163
6167
|
body: JSON.stringify(update)
|
|
6164
6168
|
});
|
|
6165
6169
|
if (!response.ok) {
|
|
6166
|
-
|
|
6170
|
+
const body = await response.text();
|
|
6171
|
+
console.error(`[MCP] Failed to update connection status: ${response.status} - ${body}`);
|
|
6172
|
+
} else {
|
|
6173
|
+
console.log(`[MCP] Connection ${connectionId} updated to ${update.status}`);
|
|
6167
6174
|
}
|
|
6168
6175
|
} catch (err) {
|
|
6169
6176
|
console.error("[MCP] Failed to update connection status:", err);
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
promptForApiKey,
|
|
15
15
|
runDeviceAuth,
|
|
16
16
|
saveCredentials
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4L6FPX5K.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
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
|
|
@@ -253,8 +258,11 @@ export class McpHandler {
|
|
|
253
258
|
connectionId: string,
|
|
254
259
|
update: { status: string; mcp_configured: boolean; error_message?: string }
|
|
255
260
|
): Promise<void> {
|
|
261
|
+
const url = `${this.config.baseUrl}/connections/${connectionId}`;
|
|
262
|
+
console.log(`[MCP] Updating connection ${connectionId} to status: ${update.status}`);
|
|
263
|
+
|
|
256
264
|
try {
|
|
257
|
-
const response = await fetch(
|
|
265
|
+
const response = await fetch(url, {
|
|
258
266
|
method: 'PATCH',
|
|
259
267
|
headers: {
|
|
260
268
|
'Authorization': `Bearer ${this.config.apiKey}`,
|
|
@@ -264,7 +272,10 @@ export class McpHandler {
|
|
|
264
272
|
});
|
|
265
273
|
|
|
266
274
|
if (!response.ok) {
|
|
267
|
-
|
|
275
|
+
const body = await response.text();
|
|
276
|
+
console.error(`[MCP] Failed to update connection status: ${response.status} - ${body}`);
|
|
277
|
+
} else {
|
|
278
|
+
console.log(`[MCP] Connection ${connectionId} updated to ${update.status}`);
|
|
268
279
|
}
|
|
269
280
|
} catch (err) {
|
|
270
281
|
console.error('[MCP] Failed to update connection status:', err);
|