@mutagent/cli 0.1.19 → 0.1.21
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/bin/cli.js +56 -29
- package/dist/bin/cli.js.map +9 -9
- package/package.json +4 -5
package/dist/bin/cli.js
CHANGED
|
@@ -4190,7 +4190,7 @@ import { readFileSync as readFileSync5, existsSync as existsSync5 } from "fs";
|
|
|
4190
4190
|
var langchainIntegration = {
|
|
4191
4191
|
name: "langchain",
|
|
4192
4192
|
description: "LangChain framework",
|
|
4193
|
-
|
|
4193
|
+
detect() {
|
|
4194
4194
|
let hasLangchain = false;
|
|
4195
4195
|
if (existsSync5("package.json")) {
|
|
4196
4196
|
try {
|
|
@@ -4199,14 +4199,14 @@ var langchainIntegration = {
|
|
|
4199
4199
|
hasLangchain = "langchain" in deps || "@langchain/core" in deps;
|
|
4200
4200
|
} catch {}
|
|
4201
4201
|
}
|
|
4202
|
-
return {
|
|
4202
|
+
return Promise.resolve({
|
|
4203
4203
|
detected: hasLangchain,
|
|
4204
4204
|
confidence: hasLangchain ? 0.9 : 0,
|
|
4205
4205
|
files: hasLangchain ? ["package.json"] : []
|
|
4206
|
-
};
|
|
4206
|
+
});
|
|
4207
4207
|
},
|
|
4208
|
-
|
|
4209
|
-
return `---
|
|
4208
|
+
generate(config) {
|
|
4209
|
+
return Promise.resolve(`---
|
|
4210
4210
|
name: mutagent-langchain-integration
|
|
4211
4211
|
description: Integrate MutagenT with LangChain for prompt optimization and trace observability
|
|
4212
4212
|
framework: langchain
|
|
@@ -4321,7 +4321,7 @@ mutagent traces list --prompt <prompt-id>
|
|
|
4321
4321
|
# Analyze performance
|
|
4322
4322
|
mutagent traces analyze <prompt-id>
|
|
4323
4323
|
\`\`\`
|
|
4324
|
-
|
|
4324
|
+
`);
|
|
4325
4325
|
}
|
|
4326
4326
|
};
|
|
4327
4327
|
|
|
@@ -4330,7 +4330,7 @@ import { readFileSync as readFileSync6, existsSync as existsSync6 } from "fs";
|
|
|
4330
4330
|
var langgraphIntegration = {
|
|
4331
4331
|
name: "langgraph",
|
|
4332
4332
|
description: "LangGraph agent workflow framework",
|
|
4333
|
-
|
|
4333
|
+
detect() {
|
|
4334
4334
|
let hasLanggraph = false;
|
|
4335
4335
|
if (existsSync6("package.json")) {
|
|
4336
4336
|
try {
|
|
@@ -4339,14 +4339,14 @@ var langgraphIntegration = {
|
|
|
4339
4339
|
hasLanggraph = "@langchain/langgraph" in deps;
|
|
4340
4340
|
} catch {}
|
|
4341
4341
|
}
|
|
4342
|
-
return {
|
|
4342
|
+
return Promise.resolve({
|
|
4343
4343
|
detected: hasLanggraph,
|
|
4344
4344
|
confidence: hasLanggraph ? 0.95 : 0,
|
|
4345
4345
|
files: hasLanggraph ? ["package.json"] : []
|
|
4346
|
-
};
|
|
4346
|
+
});
|
|
4347
4347
|
},
|
|
4348
|
-
|
|
4349
|
-
return `---
|
|
4348
|
+
generate(config) {
|
|
4349
|
+
return Promise.resolve(`---
|
|
4350
4350
|
name: mutagent-langgraph-integration
|
|
4351
4351
|
description: Integrate MutagenT with LangGraph for agent workflow observability
|
|
4352
4352
|
framework: langgraph
|
|
@@ -4450,7 +4450,7 @@ mutagent integrate langgraph --verify
|
|
|
4450
4450
|
- Full guide: https://docs.mutagent.io/integrations/langgraph
|
|
4451
4451
|
- API Reference: https://docs.mutagent.io/sdk/tracing
|
|
4452
4452
|
- Dashboard: https://app.mutagent.io
|
|
4453
|
-
|
|
4453
|
+
`);
|
|
4454
4454
|
}
|
|
4455
4455
|
};
|
|
4456
4456
|
|
|
@@ -4459,7 +4459,7 @@ import { readFileSync as readFileSync7, existsSync as existsSync7 } from "fs";
|
|
|
4459
4459
|
var vercelAiIntegration = {
|
|
4460
4460
|
name: "vercel-ai",
|
|
4461
4461
|
description: "Vercel AI SDK",
|
|
4462
|
-
|
|
4462
|
+
detect() {
|
|
4463
4463
|
let hasAiSdk = false;
|
|
4464
4464
|
if (existsSync7("package.json")) {
|
|
4465
4465
|
try {
|
|
@@ -4468,14 +4468,14 @@ var vercelAiIntegration = {
|
|
|
4468
4468
|
hasAiSdk = "ai" in deps;
|
|
4469
4469
|
} catch {}
|
|
4470
4470
|
}
|
|
4471
|
-
return {
|
|
4471
|
+
return Promise.resolve({
|
|
4472
4472
|
detected: hasAiSdk,
|
|
4473
4473
|
confidence: hasAiSdk ? 0.9 : 0,
|
|
4474
4474
|
files: hasAiSdk ? ["package.json"] : []
|
|
4475
|
-
};
|
|
4475
|
+
});
|
|
4476
4476
|
},
|
|
4477
|
-
|
|
4478
|
-
return `---
|
|
4477
|
+
generate(config) {
|
|
4478
|
+
return Promise.resolve(`---
|
|
4479
4479
|
name: mutagent-vercel-ai-integration
|
|
4480
4480
|
description: Integrate MutagenT with Vercel AI SDK for streaming and edge functions
|
|
4481
4481
|
framework: vercel-ai
|
|
@@ -4596,7 +4596,7 @@ mutagent integrate vercel-ai --verify
|
|
|
4596
4596
|
- Full guide: https://docs.mutagent.io/integrations/vercel-ai
|
|
4597
4597
|
- API Reference: https://docs.mutagent.io/sdk/tracing
|
|
4598
4598
|
- Dashboard: https://app.mutagent.io
|
|
4599
|
-
|
|
4599
|
+
`);
|
|
4600
4600
|
}
|
|
4601
4601
|
};
|
|
4602
4602
|
|
|
@@ -4605,7 +4605,7 @@ import { readFileSync as readFileSync8, existsSync as existsSync8 } from "fs";
|
|
|
4605
4605
|
var openaiIntegration = {
|
|
4606
4606
|
name: "openai",
|
|
4607
4607
|
description: "OpenAI SDK integration with automatic tracing",
|
|
4608
|
-
|
|
4608
|
+
detect() {
|
|
4609
4609
|
let hasOpenAI = false;
|
|
4610
4610
|
if (existsSync8("package.json")) {
|
|
4611
4611
|
try {
|
|
@@ -4614,14 +4614,14 @@ var openaiIntegration = {
|
|
|
4614
4614
|
hasOpenAI = "openai" in deps;
|
|
4615
4615
|
} catch {}
|
|
4616
4616
|
}
|
|
4617
|
-
return {
|
|
4617
|
+
return Promise.resolve({
|
|
4618
4618
|
detected: hasOpenAI,
|
|
4619
4619
|
confidence: hasOpenAI ? 0.85 : 0,
|
|
4620
4620
|
files: hasOpenAI ? ["package.json"] : []
|
|
4621
|
-
};
|
|
4621
|
+
});
|
|
4622
4622
|
},
|
|
4623
|
-
|
|
4624
|
-
return `---
|
|
4623
|
+
generate(config) {
|
|
4624
|
+
return Promise.resolve(`---
|
|
4625
4625
|
name: mutagent-openai-integration
|
|
4626
4626
|
description: Integrate MutagenT with OpenAI SDK for automatic tracing
|
|
4627
4627
|
framework: openai
|
|
@@ -4709,7 +4709,7 @@ mutagent integrate openai --verify
|
|
|
4709
4709
|
- Full guide: https://docs.mutagent.io/integrations/openai
|
|
4710
4710
|
- API Reference: https://docs.mutagent.io/sdk/tracing
|
|
4711
4711
|
- Dashboard: https://app.mutagent.io
|
|
4712
|
-
|
|
4712
|
+
`);
|
|
4713
4713
|
}
|
|
4714
4714
|
};
|
|
4715
4715
|
|
|
@@ -6416,6 +6416,14 @@ import { Command as Command13 } from "commander";
|
|
|
6416
6416
|
import chalk16 from "chalk";
|
|
6417
6417
|
import { existsSync as existsSync11, mkdirSync as mkdirSync4, writeFileSync as writeFileSync5 } from "fs";
|
|
6418
6418
|
import { join as join6 } from "path";
|
|
6419
|
+
import { execSync as execSync3 } from "child_process";
|
|
6420
|
+
function findRepoRoot() {
|
|
6421
|
+
try {
|
|
6422
|
+
return execSync3("git rev-parse --show-toplevel", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
6423
|
+
} catch {
|
|
6424
|
+
return process.cwd();
|
|
6425
|
+
}
|
|
6426
|
+
}
|
|
6419
6427
|
var SKILL_FRONTMATTER = `---
|
|
6420
6428
|
name: mutagent-cli
|
|
6421
6429
|
description: |
|
|
@@ -6536,7 +6544,8 @@ that teaches coding agents how to use the MutagenT CLI effectively.
|
|
|
6536
6544
|
const parentCmd = cmd.parent?.parent;
|
|
6537
6545
|
const isJson = parentCmd ? getJsonFlag(parentCmd) : false;
|
|
6538
6546
|
const output = new OutputFormatter(isJson ? "json" : "table");
|
|
6539
|
-
const
|
|
6547
|
+
const repoRoot = findRepoRoot();
|
|
6548
|
+
const skillDir = join6(repoRoot, SKILL_DIR);
|
|
6540
6549
|
const skillPath = join6(skillDir, SKILL_FILE);
|
|
6541
6550
|
if (!existsSync11(skillDir)) {
|
|
6542
6551
|
mkdirSync4(skillDir, { recursive: true });
|
|
@@ -6706,6 +6715,7 @@ ${chalk18.yellow("Workflows:")}
|
|
|
6706
6715
|
${chalk18.green("✓")} Evaluation with criteria (field-level, input/output focused)
|
|
6707
6716
|
${chalk18.dim("•")} LLM provider ${chalk18.dim("(only when server uses external providers)")}
|
|
6708
6717
|
`);
|
|
6718
|
+
var skillInstalled = existsSync12(join7(findRepoRoot(), ".claude/skills/mutagent-cli/SKILL.md"));
|
|
6709
6719
|
program.addHelpText("after", `
|
|
6710
6720
|
${chalk18.cyan("┌─ AI AGENT INTEGRATION HINT ────────────────────────────────────────────────┐")}
|
|
6711
6721
|
${chalk18.cyan("│")} ${chalk18.cyan("│")}
|
|
@@ -6720,9 +6730,26 @@ ${!hasCredentials() ? chalk18.yellow(`
|
|
|
6720
6730
|
Warning: Not authenticated. Run: mutagent auth login --browser
|
|
6721
6731
|
`) : ""}${!hasRcConfig() ? chalk18.green(`
|
|
6722
6732
|
Get started: mutagent init
|
|
6723
|
-
`) : ""}
|
|
6724
|
-
|
|
6725
|
-
|
|
6733
|
+
`) : ""}
|
|
6734
|
+
${chalk18.red.bold("┌─ CRITICAL: AI CODING AGENT — READ THIS FIRST ─────────────────────────────┐")}
|
|
6735
|
+
${chalk18.red.bold("│")} ${chalk18.red.bold("│")}
|
|
6736
|
+
${chalk18.red.bold("│")} MutagenT Skill Status: ${skillInstalled ? chalk18.green.bold("INSTALLED ✓") + " " : chalk18.yellow.bold("NOT INSTALLED") + " "}${chalk18.red.bold("│")}
|
|
6737
|
+
${chalk18.red.bold("│")} ${chalk18.red.bold("│")}${skillInstalled ? "" : `
|
|
6738
|
+
${chalk18.red.bold("│")} The MutagenT CLI skill (.claude/skills/mutagent-cli/SKILL.md) is ${chalk18.red.bold("│")}
|
|
6739
|
+
${chalk18.red.bold("│")} NOT installed in this project. This skill teaches you how to use ${chalk18.red.bold("│")}
|
|
6740
|
+
${chalk18.red.bold("│")} the MutagenT CLI effectively for prompt optimization workflows. ${chalk18.red.bold("│")}
|
|
6741
|
+
${chalk18.red.bold("│")} ${chalk18.red.bold("│")}
|
|
6742
|
+
${chalk18.red.bold("│")} ACTION REQUIRED: Ask the user: ${chalk18.red.bold("│")}
|
|
6743
|
+
${chalk18.red.bold("│")} "Install the MutagenT CLI skill for better AI assistance? (Yes/No)" ${chalk18.red.bold("│")}
|
|
6744
|
+
${chalk18.red.bold("│")} ${chalk18.red.bold("│")}
|
|
6745
|
+
${chalk18.red.bold("│")} If Yes → run: mutagent skills install ${chalk18.red.bold("│")}
|
|
6746
|
+
${chalk18.red.bold("│")} If No → continue without skill (reduced guidance) ${chalk18.red.bold("│")}
|
|
6747
|
+
${chalk18.red.bold("│")} ${chalk18.red.bold("│")}`}
|
|
6748
|
+
${chalk18.red.bold("│")} After install, the skill auto-loads when triggers match: ${chalk18.red.bold("│")}
|
|
6749
|
+
${chalk18.red.bold("│")} "mutagent", "optimize prompt", "integrate tracing", etc. ${chalk18.red.bold("│")}
|
|
6750
|
+
${chalk18.red.bold("│")} ${chalk18.red.bold("│")}
|
|
6751
|
+
${chalk18.red.bold("└────────────────────────────────────────────────────────────────────────────┘")}
|
|
6752
|
+
`);
|
|
6726
6753
|
program.hook("preAction", (thisCommand) => {
|
|
6727
6754
|
const globalOpts = thisCommand.optsWithGlobals();
|
|
6728
6755
|
if (globalOpts.apiKey && !process.env.MUTAGENT_API_KEY) {
|
|
@@ -6751,5 +6778,5 @@ program.addCommand(createSkillsCommand());
|
|
|
6751
6778
|
program.addCommand(createUsageCommand());
|
|
6752
6779
|
program.parse();
|
|
6753
6780
|
|
|
6754
|
-
//# debugId=
|
|
6781
|
+
//# debugId=50A4FEB3E212CA6764756E2164756E21
|
|
6755
6782
|
//# sourceMappingURL=cli.js.map
|