@mutagent/cli 0.1.40 → 0.1.41

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 CHANGED
@@ -7068,70 +7068,66 @@ Modes:
7068
7068
  }
7069
7069
  }
7070
7070
  }
7071
- if (!isNonInteractive) {
7072
- const skillPath = join6(cwd, ".claude/skills/mutagent-cli/SKILL.md");
7073
- if (!existsSync12(skillPath)) {
7074
- const { installSkill } = await inquirer3.prompt([{
7075
- type: "confirm",
7076
- name: "installSkill",
7077
- message: "Install MutagenT skill for Claude Code? (Teaches AI agents how to use the CLI)",
7078
- default: true
7079
- }]);
7080
- if (installSkill) {
7081
- try {
7082
- const skillDir = join6(cwd, ".claude/skills/mutagent-cli");
7083
- if (!existsSync12(skillDir)) {
7084
- mkdirSync3(skillDir, { recursive: true });
7085
- }
7086
- execSync3("node " + join6(cwd, "node_modules/.bin/mutagent") + " skills install", {
7087
- cwd,
7088
- stdio: "ignore"
7089
- });
7090
- output.success("Installed MutagenT CLI skill for Claude Code");
7091
- } catch {
7092
- output.info("Install skill manually: mutagent skills install");
7071
+ const skillPath = join6(cwd, ".claude/skills/mutagent-cli/SKILL.md");
7072
+ const skillInstalled = existsSync12(skillPath);
7073
+ if (!isNonInteractive && !skillInstalled) {
7074
+ const { installSkill } = await inquirer3.prompt([{
7075
+ type: "confirm",
7076
+ name: "installSkill",
7077
+ message: "Install MutagenT skill for Claude Code? (Teaches AI agents how to use the CLI)",
7078
+ default: true
7079
+ }]);
7080
+ if (installSkill) {
7081
+ try {
7082
+ const skillDir = join6(cwd, ".claude/skills/mutagent-cli");
7083
+ if (!existsSync12(skillDir)) {
7084
+ mkdirSync3(skillDir, { recursive: true });
7093
7085
  }
7086
+ execSync3("node " + join6(cwd, "node_modules/.bin/mutagent") + " skills install", {
7087
+ cwd,
7088
+ stdio: "ignore"
7089
+ });
7090
+ output.success("Installed MutagenT CLI skill for Claude Code");
7091
+ } catch {
7092
+ output.info("Install skill manually: mutagent skills install");
7094
7093
  }
7095
7094
  }
7096
7095
  }
7097
- if (isJson) {
7098
- const skillPath = join6(cwd, ".claude/skills/mutagent-cli/SKILL.md");
7099
- const skillInstalled = existsSync12(skillPath);
7100
- output.output({
7101
- success: true,
7102
- mode,
7103
- configFile: ".mutagentrc.json",
7104
- config: rcConfig,
7105
- framework: confirmedFramework?.name ?? null,
7106
- authenticated,
7107
- workspaceValidation: workspaceValidation ?? null,
7108
- skillInstalled,
7109
- _directive: {
7110
- instruction: "Verify workspace. Run: mutagent workspaces list --json",
7111
- next: ["mutagent workspaces list --json", "mutagent prompts list --json"],
7112
- ...!skillInstalled ? {
7113
- skillInstall: {
7114
- instruction: [
7115
- "MANDATORY: Ask the user whether they want to install the MutagenT CLI skill and Claude Code hooks.",
7116
- "Use your AskUserQuestion tool to present the following choices:",
7117
- "1. Install skill + hooks (Recommended) — Installs the CLI skill AND configures Claude Code session telemetry hooks",
7118
- "2. Install skill only — Installs the CLI skill (teaches AI agents to use MutagenT CLI)",
7119
- "3. Skip Do not install",
7120
- "",
7121
- "If the user picks option 1, run BOTH commands:",
7122
- " mutagent skills install --json",
7123
- "Then add this hooks config to .claude/settings.local.json:",
7124
- ' {"hooks":{"SessionStart":[{"matcher":"startup","hooks":[{"type":"command","command":"mutagent hooks claude-code session-start"}]}],"Stop":[{"hooks":[{"type":"command","command":"mutagent hooks claude-code session-end"}]}],"PreToolUse":[{"hooks":[{"type":"command","command":"mutagent hooks claude-code pre-tool-use"}]}],"PostToolUse":[{"hooks":[{"type":"command","command":"mutagent hooks claude-code post-tool-use"}]}]}}',
7125
- "",
7126
- "If the user picks option 2, run only: mutagent skills install --json"
7127
- ].join(`
7096
+ const summary = {
7097
+ success: true,
7098
+ mode,
7099
+ configFile: ".mutagentrc.json",
7100
+ config: rcConfig,
7101
+ framework: confirmedFramework?.name ?? null,
7102
+ authenticated,
7103
+ workspaceValidation: workspaceValidation ?? null,
7104
+ skillInstalled: skillInstalled || existsSync12(skillPath),
7105
+ _directive: {
7106
+ instruction: "Verify workspace. Run: mutagent workspaces list --json",
7107
+ next: ["mutagent workspaces list --json", "mutagent prompts list --json"],
7108
+ ...!skillInstalled ? {
7109
+ skillInstall: {
7110
+ instruction: [
7111
+ "MANDATORY: Ask the user whether they want to install the MutagenT CLI skill and Claude Code hooks.",
7112
+ "Use your AskUserQuestion tool to present the following choices:",
7113
+ "1. Install skill + hooks (Recommended) — Installs the CLI skill AND configures Claude Code session telemetry hooks",
7114
+ "2. Install skill only Installs the CLI skill (teaches AI agents to use MutagenT CLI)",
7115
+ "3. Skip Do not install",
7116
+ "",
7117
+ "If the user picks option 1, run BOTH commands:",
7118
+ " mutagent skills install --json",
7119
+ "Then add this hooks config to .claude/settings.local.json:",
7120
+ ' {"hooks":{"SessionStart":[{"matcher":"startup","hooks":[{"type":"command","command":"mutagent hooks claude-code session-start"}]}],"Stop":[{"hooks":[{"type":"command","command":"mutagent hooks claude-code session-end"}]}],"PreToolUse":[{"hooks":[{"type":"command","command":"mutagent hooks claude-code pre-tool-use"}]}],"PostToolUse":[{"hooks":[{"type":"command","command":"mutagent hooks claude-code post-tool-use"}]}]}}',
7121
+ "",
7122
+ "If the user picks option 2, run only: mutagent skills install --json"
7123
+ ].join(`
7128
7124
  `),
7129
- command: "mutagent skills install --json"
7130
- }
7131
- } : {}
7132
- }
7133
- });
7134
- }
7125
+ command: "mutagent skills install --json"
7126
+ }
7127
+ } : {}
7128
+ }
7129
+ };
7130
+ output.output(summary);
7135
7131
  } catch (error) {
7136
7132
  handleError(error, isJson);
7137
7133
  }
@@ -7863,5 +7859,5 @@ program.addCommand(createUsageCommand());
7863
7859
  program.addCommand(createHooksCommand());
7864
7860
  program.parse();
7865
7861
 
7866
- //# debugId=3A9F4B3C7C1276F864756E2164756E21
7862
+ //# debugId=C82411F79C0AD74464756E2164756E21
7867
7863
  //# sourceMappingURL=cli.js.map