@artyfacts/claude 1.3.20 → 1.3.22
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-5H7VYMUX.mjs +1040 -0
- package/dist/chunk-FU42UGDO.mjs +1033 -0
- package/dist/cli.js +12 -5
- package/dist/cli.mjs +1 -1
- package/dist/index.js +12 -5
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/mcp.ts +19 -5
package/dist/cli.js
CHANGED
|
@@ -921,20 +921,27 @@ var McpHandler = class {
|
|
|
921
921
|
console.log(`[MCP] Triggering ${platform} OAuth via Claude...`);
|
|
922
922
|
const oauthProcess = (0, import_child_process2.spawnSync)("claude", [
|
|
923
923
|
"-p",
|
|
924
|
-
`
|
|
924
|
+
`Run the mcp__${serverName}__authenticate tool now to start OAuth. Do not ask for confirmation, just run it.`,
|
|
925
925
|
"--allowedTools",
|
|
926
926
|
`mcp__${serverName}__*`,
|
|
927
927
|
"--permission-mode",
|
|
928
928
|
"bypassPermissions"
|
|
929
929
|
], {
|
|
930
930
|
encoding: "utf-8",
|
|
931
|
-
stdio: "
|
|
932
|
-
//
|
|
931
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
932
|
+
// Capture output to parse URL
|
|
933
933
|
timeout: 12e4
|
|
934
|
-
// 2 minute timeout for user to complete OAuth
|
|
935
934
|
});
|
|
935
|
+
const output = oauthProcess.stdout || "";
|
|
936
|
+
console.log(output);
|
|
937
|
+
const urlMatch = output.match(/https:\/\/[^\s<>"]+oauth[^\s<>"]+/i) || output.match(/https:\/\/api\.supabase\.com[^\s<>"]+/i) || output.match(/https:\/\/www\.figma\.com\/oauth[^\s<>"]+/i);
|
|
938
|
+
if (urlMatch) {
|
|
939
|
+
const oauthUrl = urlMatch[0];
|
|
940
|
+
console.log(`[MCP] Opening OAuth URL in browser...`);
|
|
941
|
+
(0, import_child_process2.spawnSync)("open", [oauthUrl], { encoding: "utf-8" });
|
|
942
|
+
}
|
|
936
943
|
if (oauthProcess.status === 0) {
|
|
937
|
-
console.log(`[MCP] ${platform} OAuth
|
|
944
|
+
console.log(`[MCP] ${platform} OAuth triggered!`);
|
|
938
945
|
} else {
|
|
939
946
|
console.log(`[MCP] OAuth may need completion - try using ${platform} tools in Claude`);
|
|
940
947
|
}
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -6114,20 +6114,27 @@ var McpHandler = class {
|
|
|
6114
6114
|
console.log(`[MCP] Triggering ${platform} OAuth via Claude...`);
|
|
6115
6115
|
const oauthProcess = (0, import_child_process2.spawnSync)("claude", [
|
|
6116
6116
|
"-p",
|
|
6117
|
-
`
|
|
6117
|
+
`Run the mcp__${serverName}__authenticate tool now to start OAuth. Do not ask for confirmation, just run it.`,
|
|
6118
6118
|
"--allowedTools",
|
|
6119
6119
|
`mcp__${serverName}__*`,
|
|
6120
6120
|
"--permission-mode",
|
|
6121
6121
|
"bypassPermissions"
|
|
6122
6122
|
], {
|
|
6123
6123
|
encoding: "utf-8",
|
|
6124
|
-
stdio: "
|
|
6125
|
-
//
|
|
6124
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
6125
|
+
// Capture output to parse URL
|
|
6126
6126
|
timeout: 12e4
|
|
6127
|
-
// 2 minute timeout for user to complete OAuth
|
|
6128
6127
|
});
|
|
6128
|
+
const output = oauthProcess.stdout || "";
|
|
6129
|
+
console.log(output);
|
|
6130
|
+
const urlMatch = output.match(/https:\/\/[^\s<>"]+oauth[^\s<>"]+/i) || output.match(/https:\/\/api\.supabase\.com[^\s<>"]+/i) || output.match(/https:\/\/www\.figma\.com\/oauth[^\s<>"]+/i);
|
|
6131
|
+
if (urlMatch) {
|
|
6132
|
+
const oauthUrl = urlMatch[0];
|
|
6133
|
+
console.log(`[MCP] Opening OAuth URL in browser...`);
|
|
6134
|
+
(0, import_child_process2.spawnSync)("open", [oauthUrl], { encoding: "utf-8" });
|
|
6135
|
+
}
|
|
6129
6136
|
if (oauthProcess.status === 0) {
|
|
6130
|
-
console.log(`[MCP] ${platform} OAuth
|
|
6137
|
+
console.log(`[MCP] ${platform} OAuth triggered!`);
|
|
6131
6138
|
} else {
|
|
6132
6139
|
console.log(`[MCP] OAuth may need completion - try using ${platform} tools in Claude`);
|
|
6133
6140
|
}
|
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-5H7VYMUX.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
|
@@ -198,21 +198,35 @@ export class McpHandler {
|
|
|
198
198
|
|
|
199
199
|
console.log(`[MCP] Added ${serverName} → ${oauthServer.url}`);
|
|
200
200
|
|
|
201
|
-
// Trigger OAuth by
|
|
201
|
+
// Trigger OAuth by telling Claude to run the authenticate tool
|
|
202
202
|
console.log(`[MCP] Triggering ${platform} OAuth via Claude...`);
|
|
203
203
|
const oauthProcess = spawnSync('claude', [
|
|
204
204
|
'-p',
|
|
205
|
-
`
|
|
205
|
+
`Run the mcp__${serverName}__authenticate tool now to start OAuth. Do not ask for confirmation, just run it.`,
|
|
206
206
|
'--allowedTools', `mcp__${serverName}__*`,
|
|
207
207
|
'--permission-mode', 'bypassPermissions',
|
|
208
208
|
], {
|
|
209
209
|
encoding: 'utf-8',
|
|
210
|
-
stdio: '
|
|
211
|
-
timeout: 120000,
|
|
210
|
+
stdio: ['pipe', 'pipe', 'pipe'], // Capture output to parse URL
|
|
211
|
+
timeout: 120000,
|
|
212
212
|
});
|
|
213
213
|
|
|
214
|
+
const output = oauthProcess.stdout || '';
|
|
215
|
+
console.log(output); // Still show the output
|
|
216
|
+
|
|
217
|
+
// Parse OAuth URL from output and open it
|
|
218
|
+
const urlMatch = output.match(/https:\/\/[^\s<>"]+oauth[^\s<>"]+/i) ||
|
|
219
|
+
output.match(/https:\/\/api\.supabase\.com[^\s<>"]+/i) ||
|
|
220
|
+
output.match(/https:\/\/www\.figma\.com\/oauth[^\s<>"]+/i);
|
|
221
|
+
|
|
222
|
+
if (urlMatch) {
|
|
223
|
+
const oauthUrl = urlMatch[0];
|
|
224
|
+
console.log(`[MCP] Opening OAuth URL in browser...`);
|
|
225
|
+
spawnSync('open', [oauthUrl], { encoding: 'utf-8' });
|
|
226
|
+
}
|
|
227
|
+
|
|
214
228
|
if (oauthProcess.status === 0) {
|
|
215
|
-
console.log(`[MCP] ${platform} OAuth
|
|
229
|
+
console.log(`[MCP] ${platform} OAuth triggered!`);
|
|
216
230
|
} else {
|
|
217
231
|
console.log(`[MCP] OAuth may need completion - try using ${platform} tools in Claude`);
|
|
218
232
|
}
|