@artyfacts/claude 1.3.6 → 1.3.8
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-G6HSQFKJ.mjs +806 -0
- package/dist/chunk-HD3C42LY.mjs +804 -0
- package/dist/cli.js +20 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.js +20 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/executor.ts +24 -2
package/dist/cli.js
CHANGED
|
@@ -478,7 +478,26 @@ var ClaudeExecutor = class {
|
|
|
478
478
|
runClaude(prompt) {
|
|
479
479
|
return new Promise((resolve, reject) => {
|
|
480
480
|
const claudePath = this.config.claudePath || "claude";
|
|
481
|
-
const
|
|
481
|
+
const mcpConfig = {
|
|
482
|
+
mcpServers: {
|
|
483
|
+
artyfacts: {
|
|
484
|
+
command: "npx",
|
|
485
|
+
args: ["-y", "@artyfacts/mcp-server"],
|
|
486
|
+
env: {
|
|
487
|
+
ARTYFACTS_API_KEY: this.config.apiKey || process.env.ARTYFACTS_API_KEY || "",
|
|
488
|
+
ARTYFACTS_BASE_URL: this.config.baseUrl || "https://artyfacts.dev/api/v1"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
const args = [
|
|
494
|
+
"--print",
|
|
495
|
+
"--mcp-config",
|
|
496
|
+
JSON.stringify(mcpConfig),
|
|
497
|
+
"--permission-mode",
|
|
498
|
+
"bypassPermissions"
|
|
499
|
+
];
|
|
500
|
+
const proc = (0, import_child_process.spawn)(claudePath, args, {
|
|
482
501
|
stdio: ["pipe", "pipe", "pipe"],
|
|
483
502
|
timeout: this.config.timeout
|
|
484
503
|
});
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -508,7 +508,26 @@ var ClaudeExecutor = class {
|
|
|
508
508
|
runClaude(prompt) {
|
|
509
509
|
return new Promise((resolve, reject) => {
|
|
510
510
|
const claudePath = this.config.claudePath || "claude";
|
|
511
|
-
const
|
|
511
|
+
const mcpConfig = {
|
|
512
|
+
mcpServers: {
|
|
513
|
+
artyfacts: {
|
|
514
|
+
command: "npx",
|
|
515
|
+
args: ["-y", "@artyfacts/mcp-server"],
|
|
516
|
+
env: {
|
|
517
|
+
ARTYFACTS_API_KEY: this.config.apiKey || process.env.ARTYFACTS_API_KEY || "",
|
|
518
|
+
ARTYFACTS_BASE_URL: this.config.baseUrl || "https://artyfacts.dev/api/v1"
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
const args = [
|
|
524
|
+
"--print",
|
|
525
|
+
"--mcp-config",
|
|
526
|
+
JSON.stringify(mcpConfig),
|
|
527
|
+
"--permission-mode",
|
|
528
|
+
"bypassPermissions"
|
|
529
|
+
];
|
|
530
|
+
const proc = (0, import_child_process.spawn)(claudePath, args, {
|
|
512
531
|
stdio: ["pipe", "pipe", "pipe"],
|
|
513
532
|
timeout: this.config.timeout
|
|
514
533
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
promptForApiKey,
|
|
13
13
|
runDeviceAuth,
|
|
14
14
|
saveCredentials
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-G6HSQFKJ.mjs";
|
|
16
16
|
|
|
17
17
|
// node_modules/@anthropic-ai/sdk/internal/tslib.mjs
|
|
18
18
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
package/package.json
CHANGED
package/src/executor.ts
CHANGED
|
@@ -181,9 +181,31 @@ export class ClaudeExecutor {
|
|
|
181
181
|
return new Promise((resolve, reject) => {
|
|
182
182
|
const claudePath = this.config.claudePath || 'claude';
|
|
183
183
|
|
|
184
|
+
// Build MCP config for Artyfacts tools
|
|
185
|
+
// claude --print doesn't auto-load MCP servers, so we pass them explicitly
|
|
186
|
+
const mcpConfig = {
|
|
187
|
+
mcpServers: {
|
|
188
|
+
artyfacts: {
|
|
189
|
+
command: 'npx',
|
|
190
|
+
args: ['-y', '@artyfacts/mcp-server'],
|
|
191
|
+
env: {
|
|
192
|
+
ARTYFACTS_API_KEY: this.config.apiKey || process.env.ARTYFACTS_API_KEY || '',
|
|
193
|
+
ARTYFACTS_BASE_URL: this.config.baseUrl || 'https://artyfacts.dev/api/v1',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
|
|
184
199
|
// Use claude CLI with --print flag for non-interactive output
|
|
185
|
-
// Pass
|
|
186
|
-
|
|
200
|
+
// Pass MCP config to enable Artyfacts tools
|
|
201
|
+
// Use permission-mode to allow tool execution without prompts
|
|
202
|
+
const args = [
|
|
203
|
+
'--print',
|
|
204
|
+
'--mcp-config', JSON.stringify(mcpConfig),
|
|
205
|
+
'--permission-mode', 'bypassPermissions',
|
|
206
|
+
];
|
|
207
|
+
|
|
208
|
+
const proc = spawn(claudePath, args, {
|
|
187
209
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
188
210
|
timeout: this.config.timeout,
|
|
189
211
|
});
|