@mutagent/cli 0.1.39 → 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,47 +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
- output.output({
7099
- success: true,
7100
- mode,
7101
- configFile: ".mutagentrc.json",
7102
- config: rcConfig,
7103
- framework: confirmedFramework?.name ?? null,
7104
- authenticated,
7105
- workspaceValidation: workspaceValidation ?? null,
7106
- _directive: {
7107
- instruction: "Verify workspace. Run: mutagent workspaces list --json",
7108
- next: ["mutagent workspaces list --json", "mutagent prompts list --json"]
7109
- }
7110
- });
7111
- }
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(`
7124
+ `),
7125
+ command: "mutagent skills install --json"
7126
+ }
7127
+ } : {}
7128
+ }
7129
+ };
7130
+ output.output(summary);
7112
7131
  } catch (error) {
7113
7132
  handleError(error, isJson);
7114
7133
  }
@@ -7840,5 +7859,5 @@ program.addCommand(createUsageCommand());
7840
7859
  program.addCommand(createHooksCommand());
7841
7860
  program.parse();
7842
7861
 
7843
- //# debugId=CF947D7B55AD31C164756E2164756E21
7862
+ //# debugId=C82411F79C0AD74464756E2164756E21
7844
7863
  //# sourceMappingURL=cli.js.map