@mutmutco/cli 3.54.0 → 3.56.0

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.
Files changed (2) hide show
  1. package/dist/main.cjs +7 -59
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -22776,9 +22776,13 @@ async function applyPluginHeal(surface, log, opts) {
22776
22776
  const refSupported = await marketplaceAddRefSupported("claude");
22777
22777
  const { steps } = adaptHealStepsForRefSupport(tableSteps, refSupported);
22778
22778
  log(healBannerLine("claude", "claude", refSupported));
22779
+ const pinsPath = (0, import_node_path26.join)((0, import_node_os6.homedir)(), ...KNOWN_MARKETPLACES_RELATIVE);
22780
+ const pins = captureMarketplacePins(readKnownMarketplacesFile(pinsPath), [MMI_MARKETPLACE_NAME, JERV_MARKETPLACE_NAME]);
22779
22781
  for (const step of steps) {
22780
22782
  if (healStepAborts(step, await runClaudePlugin([...step.args]))) return false;
22781
22783
  }
22784
+ const restored = restoreMarketplacePinsOnDisk(pinsPath, pins);
22785
+ if (restored) log(` ${restored}`);
22782
22786
  return true;
22783
22787
  }
22784
22788
  async function healClaudePluginForDoctor(surface = detectSurface(process.env)) {
@@ -22786,14 +22790,11 @@ async function healClaudePluginForDoctor(surface = detectSurface(process.env)) {
22786
22790
  return { ok: false, detail: `not a Claude surface (${surface}) \u2014 no Hub-shipped plugin to reinstall` };
22787
22791
  }
22788
22792
  const steps = [];
22789
- const pinsPath = (0, import_node_path26.join)((0, import_node_os6.homedir)(), ...KNOWN_MARKETPLACES_RELATIVE);
22790
- const before = readKnownMarketplacesFile(pinsPath);
22791
- const pins = captureMarketplacePins(before, [MMI_MARKETPLACE_NAME, JERV_MARKETPLACE_NAME]);
22792
22793
  const ok = await applyPluginHeal(surface, (msg) => steps.push(msg.trim()));
22793
- const restored = ok ? restoreMarketplacePinsOnDisk(pinsPath, pins) : void 0;
22794
+ const pinNote = steps.find((s) => s.startsWith("re-pinned ") || s.includes("re-pin by hand"));
22794
22795
  return {
22795
22796
  ok,
22796
- detail: ok ? `marketplace remove \u2192 add \u2192 install succeeded${restored ? `; ${restored}` : ""}` : `\`claude plugin\` reinstall failed or was skipped${steps.length ? ` (${steps[steps.length - 1]})` : ""}`
22797
+ detail: ok ? `marketplace remove \u2192 add \u2192 install succeeded${pinNote ? `; ${pinNote}` : ""}` : `\`claude plugin\` reinstall failed or was skipped${steps.length ? ` (${steps[steps.length - 1]})` : ""}`
22797
22798
  };
22798
22799
  }
22799
22800
  function readKnownMarketplacesFile(path2) {
@@ -24400,34 +24401,7 @@ async function runDoctorClean(opts, io, deps) {
24400
24401
  const cli = checkCliVersion(cliInput, releasedNote);
24401
24402
  if (cli) checks.push(cli);
24402
24403
  }
24403
- const cacheProbe = deps.pluginCache();
24404
- const cacheStale = cacheProbe.stale.length > 0 || cacheProbe.staging.length > 0;
24405
- if (applyEnv && deps.prunePluginCache && cacheStale) {
24406
- const pruned = await deps.prunePluginCache();
24407
- const removed = pruned.removed ?? [];
24408
- const pruneEvidence = [
24409
- `cached versions: ${cacheProbe.cached}`,
24410
- `stale: ${cacheProbe.stale.length ? cacheProbe.stale.join(", ") : "(none)"}`,
24411
- `orphaned staging dirs: ${cacheProbe.staging.length ? cacheProbe.staging.join(", ") : "(none)"}`,
24412
- `prune: ${pruned.detail}`,
24413
- ...removed.map((r) => `removed: ${r}`)
24414
- ];
24415
- checks.push(pruned.ok ? {
24416
- ok: true,
24417
- label: "plugin cache",
24418
- detail: removed.length ? `pruned ${removed.length} stale entr${removed.length === 1 ? "y" : "ies"}` : "nothing to prune",
24419
- verbose: pruneEvidence
24420
- } : {
24421
- ok: false,
24422
- label: "plugin cache",
24423
- // Same split as the other env heals (#3489): a contention skip is not this run's gap.
24424
- ...pruned.skipped ? { reportOnly: true } : {},
24425
- fix: pruned.skipped ? `${pruned.detail} \u2014 another doctor on this machine is pruning it now; re-run once it finishes` : `prune failed (${pruned.detail}) \u2014 run \`mmi-cli plugin prune --apply\``,
24426
- verbose: pruneEvidence
24427
- });
24428
- } else {
24429
- checks.push(checkPluginCache(cacheProbe));
24430
- }
24404
+ checks.push(checkPluginCache(deps.pluginCache()));
24431
24405
  if (deps.sessionPayload) {
24432
24406
  const payload = checkSessionPayload(deps.sessionPayload());
24433
24407
  if (payload) checks.push(payload);
@@ -24846,32 +24820,6 @@ function mmiDoctorDeps(opts = {}) {
24846
24820
  stagingBytes: plan.stagingBytes
24847
24821
  };
24848
24822
  },
24849
- // #3485 wave 2 item 11: the --apply reap, through the SAME plan + reaper `plugin prune --apply` drives.
24850
- // The plan's own keep-policy refuses the running and newest versions, so this cannot delete what is
24851
- // loaded. Under the #3489 env-heal lock: deleting cache dirs while another doctor is mid-reinstall is
24852
- // the same machine-global hazard the lock exists for.
24853
- prunePluginCache: () => withEnvHealLock("plugin cache prune", async () => {
24854
- const plan = buildPluginCachePlan(
24855
- (0, import_node_os9.homedir)(),
24856
- runningPluginVersion(process.env, resolveClientVersion()),
24857
- pluginCacheFsDeps((0, import_node_os9.homedir)(), directoryBytes),
24858
- { withBytes: true }
24859
- );
24860
- const result = applyPluginCachePlan(
24861
- plan,
24862
- (p) => (0, import_node_fs32.rmSync)(p, { recursive: true, force: true }),
24863
- stagingApplyFsGuard((0, import_node_os9.homedir)())
24864
- );
24865
- const removed = [...result.removed, ...result.removedStaging ?? []];
24866
- if (result.failed.length) {
24867
- return {
24868
- ok: false,
24869
- removed,
24870
- detail: `${removed.length} removed, ${result.failed.length} failed \u2014 ${result.failed.map((f) => `${f.version}: ${f.error}`).join("; ")}`
24871
- };
24872
- }
24873
- return { ok: true, removed, detail: removed.length ? `removed ${removed.join(", ")}` : "nothing to prune" };
24874
- }),
24875
24823
  // #3008: the schedules-notebook drift probe, compacted for the check. Full doctor only — the gather in
24876
24824
  // runDoctorClean skips this dep entirely on fast/banner/preflight runs.
24877
24825
  schedulesNotebook: async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "3.54.0",
3
+ "version": "3.56.0",
4
4
  "description": "MMI Future CLI — the org dev toolbox (board, registry, keyless secrets, release train, bootstrap, doctor) and the cross-IDE engine the plugin's session-start hook drives.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",