@mutmutco/cli 2.10.0 → 2.10.1
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/index.cjs +29 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5140,8 +5140,9 @@ function buildAwsCrossAccountCheck(input) {
|
|
|
5140
5140
|
}
|
|
5141
5141
|
var MMI_PLUGIN_ID = "mmi@mmi";
|
|
5142
5142
|
var PLUGIN_LABEL = "plugin install record (mmi@mmi for this project)";
|
|
5143
|
-
function pluginInstallManualFix(projectPath) {
|
|
5144
|
-
|
|
5143
|
+
function pluginInstallManualFix(projectPath, surface = "claude-cli") {
|
|
5144
|
+
const register = surface === "codex" ? `\`codex plugin add ${MMI_PLUGIN_ID}\`` : surface === "shell" ? `enable the MMI plugin in your client` : surface === "claude-vscode" ? `\`claude plugin enable ${MMI_PLUGIN_ID}\`` : `\`/plugin install ${MMI_PLUGIN_ID}\``;
|
|
5145
|
+
return `run ${register} then ${reloadAction(surface)} to register the install record for ${projectPath}`;
|
|
5145
5146
|
}
|
|
5146
5147
|
function isMmiPluginEnabled(settings) {
|
|
5147
5148
|
return Boolean(settings?.enabledPlugins?.[MMI_PLUGIN_ID]);
|
|
@@ -5161,7 +5162,7 @@ function buildPluginInstallRecordCheck(input) {
|
|
|
5161
5162
|
const base = {
|
|
5162
5163
|
ok: true,
|
|
5163
5164
|
label: PLUGIN_LABEL,
|
|
5164
|
-
fix: pluginInstallManualFix(input.projectPath),
|
|
5165
|
+
fix: pluginInstallManualFix(input.projectPath, input.surface),
|
|
5165
5166
|
pluginId
|
|
5166
5167
|
};
|
|
5167
5168
|
if (!input.isOrgRepo || !isMmiPluginEnabled(input.settings)) return base;
|
|
@@ -5177,7 +5178,7 @@ function buildPluginInstallRecordCheck(input) {
|
|
|
5177
5178
|
return {
|
|
5178
5179
|
ok: false,
|
|
5179
5180
|
label: PLUGIN_LABEL,
|
|
5180
|
-
fix: pluginInstallManualFix(input.projectPath),
|
|
5181
|
+
fix: pluginInstallManualFix(input.projectPath, input.surface),
|
|
5181
5182
|
pluginId,
|
|
5182
5183
|
recordToInsert
|
|
5183
5184
|
};
|
|
@@ -5196,8 +5197,7 @@ function bestRecord(records) {
|
|
|
5196
5197
|
}
|
|
5197
5198
|
function pluginConfigDriftFix(pluginId, surface = "claude-cli") {
|
|
5198
5199
|
const file = surface === "codex" ? "~/.codex/plugins/installed_plugins.json" : "~/.claude/plugins/installed_plugins.json";
|
|
5199
|
-
|
|
5200
|
-
return `\`${pluginId}\` has duplicate install rows or stale gitCommitSha in ${file} \u2014 run \`mmi-cli doctor\` interactively to collapse them to one user-scope row (a .bak backup is written first), then ${reload}`;
|
|
5200
|
+
return `\`${pluginId}\` has duplicate install rows or stale gitCommitSha in ${file} \u2014 run \`mmi-cli doctor\` interactively to collapse them to one user-scope row (a .bak backup is written first), then ${reloadAction(surface)}`;
|
|
5201
5201
|
}
|
|
5202
5202
|
function buildPluginConfigDriftCheck(input) {
|
|
5203
5203
|
const pluginId = input.pluginId ?? MMI_PLUGIN_ID;
|
|
@@ -5293,13 +5293,24 @@ function detectSurface(env) {
|
|
|
5293
5293
|
if (isClaude) return "claude-cli";
|
|
5294
5294
|
return "shell";
|
|
5295
5295
|
}
|
|
5296
|
+
function reloadAction(surface) {
|
|
5297
|
+
switch (surface) {
|
|
5298
|
+
case "claude-vscode":
|
|
5299
|
+
return "restart VS Code";
|
|
5300
|
+
case "codex":
|
|
5301
|
+
return "restart Codex";
|
|
5302
|
+
case "claude-cli":
|
|
5303
|
+
case "shell":
|
|
5304
|
+
default:
|
|
5305
|
+
return "restart Claude Code (or run /reload-plugins)";
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5296
5308
|
function pluginRecoveryFix(surface) {
|
|
5297
5309
|
const claude = "claude plugin marketplace update mmi && claude plugin update mmi@mmi && claude plugin enable mmi@mmi";
|
|
5298
5310
|
switch (surface) {
|
|
5299
5311
|
case "claude-vscode":
|
|
5300
|
-
return `${claude} # then reopen the VS Code workspace to reload MMI commands`;
|
|
5301
5312
|
case "claude-cli":
|
|
5302
|
-
return `${claude} # then
|
|
5313
|
+
return `${claude} # then ${reloadAction(surface)} to reload MMI commands`;
|
|
5303
5314
|
case "codex":
|
|
5304
5315
|
return "codex plugin marketplace upgrade mmi && codex plugin add mmi@mmi # then restart Codex";
|
|
5305
5316
|
case "shell":
|
|
@@ -9231,6 +9242,7 @@ async function runDoctor(opts, io = consoleIo) {
|
|
|
9231
9242
|
}
|
|
9232
9243
|
checks.push({ ok: onPath, label: "mmi-cli on PATH", fix: "auto-provisioned at session start \u2014 reopen the session, or install the MMI plugin" });
|
|
9233
9244
|
const surface = detectSurface(process.env);
|
|
9245
|
+
const reloadHint = reloadAction(surface);
|
|
9234
9246
|
let versionReport = buildVersionLagReport({
|
|
9235
9247
|
currentVersion: resolveVersion(),
|
|
9236
9248
|
repoVersion: readRepoVersion(),
|
|
@@ -9257,12 +9269,13 @@ async function runDoctor(opts, io = consoleIo) {
|
|
|
9257
9269
|
settings: readClaudeSettings(),
|
|
9258
9270
|
installed,
|
|
9259
9271
|
projectPath: process.cwd(),
|
|
9260
|
-
mirrorFrom: existingMirrorRecord(installed)
|
|
9272
|
+
mirrorFrom: existingMirrorRecord(installed),
|
|
9273
|
+
surface
|
|
9261
9274
|
});
|
|
9262
|
-
if (!pluginCheck.ok && pluginCheck.recordToInsert && !opts.json
|
|
9275
|
+
if (!pluginCheck.ok && pluginCheck.recordToInsert && !opts.json) {
|
|
9263
9276
|
if (writeProjectInstallRecord(pluginCheck.recordToInsert)) {
|
|
9264
9277
|
pluginCheck = { ...pluginCheck, ok: true };
|
|
9265
|
-
io.err(
|
|
9278
|
+
io.err(` \u21BB repaired: registered mmi@mmi project install record \u2014 ${reloadHint} to load MMI commands`);
|
|
9266
9279
|
}
|
|
9267
9280
|
}
|
|
9268
9281
|
checks.push(pluginCheck);
|
|
@@ -9275,10 +9288,10 @@ async function runDoctor(opts, io = consoleIo) {
|
|
|
9275
9288
|
}
|
|
9276
9289
|
checks.push(gitignoreCheck);
|
|
9277
9290
|
let driftCheck = buildPluginConfigDriftCheck({ isOrgRepo: Boolean(cfg.sagaApiUrl), installed, surface });
|
|
9278
|
-
if (!driftCheck.ok && driftCheck.recordsToWrite && !opts.json
|
|
9291
|
+
if (!driftCheck.ok && driftCheck.recordsToWrite && !opts.json) {
|
|
9279
9292
|
if (backupAndWriteInstalledPlugins(driftCheck.recordsToWrite, driftCheck.pluginId)) {
|
|
9280
9293
|
driftCheck = { ...driftCheck, ok: true };
|
|
9281
|
-
io.err(
|
|
9294
|
+
io.err(` \u21BB repaired: collapsed mmi@mmi to one user-scope entry (backup at installed_plugins.json.bak) \u2014 ${reloadHint} to load MMI commands`);
|
|
9282
9295
|
}
|
|
9283
9296
|
}
|
|
9284
9297
|
checks.push(driftCheck);
|
|
@@ -9298,8 +9311,7 @@ async function runDoctor(opts, io = consoleIo) {
|
|
|
9298
9311
|
});
|
|
9299
9312
|
installedVersionCheck = healed;
|
|
9300
9313
|
if (healed.ok) {
|
|
9301
|
-
|
|
9302
|
-
io.err(` \u21BB updated MMI plugin \u2192 ${releasedVersion ?? "latest"} via claude plugin \u2014 ${reload} to load the new commands`);
|
|
9314
|
+
io.err(` \u21BB updated MMI plugin \u2192 ${releasedVersion ?? "latest"} via claude plugin \u2014 ${reloadAction(surface)} to load the new commands`);
|
|
9303
9315
|
}
|
|
9304
9316
|
}
|
|
9305
9317
|
}
|
|
@@ -9311,12 +9323,12 @@ async function runDoctor(opts, io = consoleIo) {
|
|
|
9311
9323
|
releasedVersion,
|
|
9312
9324
|
installedVersions: installedPluginVersions(installed)
|
|
9313
9325
|
});
|
|
9314
|
-
if (!cacheCleanupCheck.ok && cacheCleanupCheck.quarantinePlan && !opts.json
|
|
9326
|
+
if (!cacheCleanupCheck.ok && cacheCleanupCheck.quarantinePlan && !opts.json) {
|
|
9315
9327
|
const moved = quarantinePluginCacheDirs(cacheCleanupCheck.quarantinePlan);
|
|
9316
9328
|
if (moved > 0) {
|
|
9317
9329
|
const surfaces = [...new Set(cacheCleanupCheck.leftovers?.map((entry) => entry.surface) ?? [])].join("/");
|
|
9318
9330
|
const names = cacheCleanupCheck.leftovers?.map((entry) => entry.name).join(", ");
|
|
9319
|
-
io.err(` \u21BB quarantined ${moved} stale MMI plugin cache dir(s) for ${surfaces || "agent surfaces"}: ${names} \u2014
|
|
9331
|
+
io.err(` \u21BB quarantined ${moved} stale MMI plugin cache dir(s) for ${surfaces || "agent surfaces"}: ${names} \u2014 ${reloadHint} to load MMI commands`);
|
|
9320
9332
|
}
|
|
9321
9333
|
cacheCleanupCheck = buildMmiPluginCacheCleanupCheck({
|
|
9322
9334
|
isOrgRepo: Boolean(cfg.sagaApiUrl),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/cli",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.1",
|
|
4
4
|
"description": "MMI Future CLI — delivers the org rules (whole-file), plus saga and KB access. The cross-IDE engine the plugin's SessionStart hook drives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|