@mutmutco/claude-plugin 4.6.47 → 4.6.48

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mmi",
3
3
  "displayName": "MMI",
4
- "version": "4.6.47",
4
+ "version": "4.6.48",
5
5
  "mmiCompat": "4.x",
6
6
  "description": "MMI workflow skills and org gates delivery.",
7
7
  "author": {
package/cli/dist/main.cjs CHANGED
@@ -28556,10 +28556,10 @@ var rollout_plan_default = {
28556
28556
  note: "The v4.0.0 stamp happens at cut time (D6e #4463); until then the candidate is the origin/development head artifacts (built cli/dist + npm pack), identity proven by dist content hash (D6a)."
28557
28557
  },
28558
28558
  baseline: {
28559
- version: "4.6.47",
28560
- tag: "v4.6.47",
28561
- commit: "4555234d7aa8",
28562
- npm: "@mutmutco/cli@4.6.47"
28559
+ version: "4.6.48",
28560
+ tag: "v4.6.48",
28561
+ commit: "9f3e651d8643",
28562
+ npm: "@mutmutco/cli@4.6.48"
28563
28563
  },
28564
28564
  exitCriterion: "fleet-n-of-n",
28565
28565
  hubOnlyShortcut: "forbidden",
@@ -28576,14 +28576,14 @@ var rollout_plan_default = {
28576
28576
  repo: "mutmutco/mmi-hub",
28577
28577
  role: "canary",
28578
28578
  schedule: "train",
28579
- v3Target: "v4.6.47"
28579
+ v3Target: "v4.6.48"
28580
28580
  }
28581
28581
  ],
28582
28582
  rollbackTrigger: "Any red inside the post-contract soak window: `devops train gate` FAIL attributable to the v4 doors, Hub endpoint health probe failure, a pre-v4 client admitted instead of receiving actionable HTTP 426, or npm consumer install/doctor failure on the v4-only dist.",
28583
28583
  rollback: {
28584
28584
  independent: true,
28585
- mechanism: "npm dist-tag latest -> 4.6.47 and redeploy the Hub Lambda from tag v4.6.47 (4555234d7aa8); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
28586
- v3Target: "v4.6.47 (@mutmutco/cli@4.6.47, tag commit 4555234d7aa8 \u2014 last known-good release carrying the repo-index v4-only contract)"
28585
+ mechanism: "npm dist-tag latest -> 4.6.48 and redeploy the Hub Lambda from tag v4.6.48 (9f3e651d8643); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
28586
+ v3Target: "v4.6.48 (@mutmutco/cli@4.6.48, tag commit 9f3e651d8643 \u2014 last known-good release carrying the repo-index v4-only contract)"
28587
28587
  }
28588
28588
  },
28589
28589
  {
@@ -63100,6 +63100,14 @@ function isPathAtOrWithin(path2, worktreePath) {
63100
63100
  function isWindowsCwdLockResidueError(error) {
63101
63101
  return process.platform === "win32" && /\bEPERM\b|access(?: is)? denied/i.test(error);
63102
63102
  }
63103
+ function isNodeModulesLockError(error) {
63104
+ return /^(?:EPERM|EACCES|EBUSY)\b/.test(error);
63105
+ }
63106
+ function deferredNodeModulesLockRemediation(wtPath, branch, prNumber, repo) {
63107
+ const quote = (value) => value.replace(/'/g, "''");
63108
+ const rerun = `mmi-cli devops pr merge ${prNumber ?? "<pr>"}${repo ? ` --repo ${repo}` : ""}`;
63109
+ return `Close the handle on the locked file under '${quote((0, import_node_path49.join)(wtPath, "node_modules"))}', then from the primary checkout re-run cleanup for branch '${quote(branch)}': ${rerun}`;
63110
+ }
63103
63111
  function deferredCwdLockRemediation(wtPath) {
63104
63112
  const quote = (path2) => path2.replace(/'/g, "''");
63105
63113
  return `After leaving the directory and closing its handles, remove it only if empty: [System.IO.Directory]::Delete('${quote(wtPath)}', $false)`;
@@ -63416,7 +63424,7 @@ async function removeWorktreeWithReconcile(wtPath, git3, listWorktrees, pathExis
63416
63424
  }
63417
63425
  function isPrMergeWorktreePartial(cleanup) {
63418
63426
  const worktree = cleanup?.worktree;
63419
- return Boolean(worktree?.path && worktree.status !== "removed" && worktree.status !== "preserved" && worktree.status !== "retained-locked" && worktree.status !== "switched-primary");
63427
+ return Boolean(worktree?.path && worktree.status !== "removed" && worktree.status !== "preserved" && worktree.status !== "retained-locked" && worktree.status !== "switched-primary" && worktree.status !== "deferred");
63420
63428
  }
63421
63429
  function prMergeLocalCleanupExitCode(cleanup) {
63422
63430
  return cleanup?.worktree?.status === "failed" || cleanup?.localBranch?.status === "failed" ? 1 : void 0;
@@ -63575,18 +63583,19 @@ async function cleanupPrMergeLocalBranch(branch, options) {
63575
63583
  if (pathExists((0, import_node_path49.join)(wtPath, "node_modules"))) {
63576
63584
  const nmRemoved = await (options.removeRealNodeModules ?? removeWorktreeNodeModules)(wtPath);
63577
63585
  if (!nmRemoved.ok) {
63586
+ const deferred = isNodeModulesLockError(nmRemoved.error) && pathExists(wtPath);
63578
63587
  report.worktree = {
63579
63588
  path: wtPath,
63580
- status: "failed",
63581
- reason: "pre-clean-failed",
63589
+ status: deferred ? "deferred" : "failed",
63590
+ reason: deferred ? "node-modules-locked" : "pre-clean-failed",
63582
63591
  error: `real-node_modules cleanup failed before worktree removal: ${nmRemoved.error}`,
63583
63592
  artifactsArchive,
63584
63593
  stageTeardown,
63585
63594
  tmpEvidenceCount: tmpEvidence.length,
63586
63595
  ...unlinkedReparsePoints.length ? { unlinkedReparsePoints } : {},
63587
- remediation: `Close handles to '${wtPath.replace(/'/g, "''")}' and retry MMI PR landing from the primary checkout`
63596
+ remediation: deferred ? deferredNodeModulesLockRemediation(wtPath, branch, options.prNumber, options.repo) : `Close handles to '${wtPath.replace(/'/g, "''")}' and retry MMI PR landing from the primary checkout`
63588
63597
  };
63589
- report.localBranch = { name: branch, status: "not-attempted", reason: "worktree-pre-clean-failed" };
63598
+ report.localBranch = { name: branch, status: "not-attempted", reason: deferred ? "worktree-cleanup-deferred" : "worktree-pre-clean-failed" };
63590
63599
  return report;
63591
63600
  }
63592
63601
  }
@@ -63685,6 +63694,8 @@ function renderPrMergeCleanupLines(cleanup) {
63685
63694
  lines2.push(`pr merge: preserved worktree ${wt.path} (--preserve-worktree)`);
63686
63695
  } else if (wt.status === "retained-locked") {
63687
63696
  lines2.push(`pr merge: worktree ${wt.path} cleanup deferred \u2014 its Windows parent shell still holds the cwd; ${wt.remediation ?? "exit the shell and remove the residue from the primary checkout"}`);
63697
+ } else if (wt.status === "deferred") {
63698
+ lines2.push(`pr merge: worktree ${wt.path} cleanup deferred \u2014 a node_modules file is locked${wt.error ? ` (${wt.error})` : ""}; ${wt.remediation ?? "close the handle and re-run pr merge for this PR"}`);
63688
63699
  } else if (wt.status === "switched-primary") {
63689
63700
  const now = wt.switchedTo ? `to ${wt.switchedTo}` : "to the base branch";
63690
63701
  lines2.push(wt.error ? `pr merge: primary checkout ${wt.path} switched ${now} but deleting the merged branch failed \u2014 ${wt.error}; remediate: ${wt.remediation ?? "delete the merged branch manually"}` : `pr merge: primary checkout ${wt.path} held the merged branch \u2014 switched it back ${now} and deleted the branch`);
@@ -65637,6 +65648,8 @@ ${preparation.findings.map((finding) => `[${finding.check}/${finding.state}] ${f
65637
65648
  preserveWorktree: o.preserveWorktree,
65638
65649
  gcAcknowledged: o.gc,
65639
65650
  expectedHeadOid: headRefOid,
65651
+ prNumber: number,
65652
+ repo: repoForPostCleanup,
65640
65653
  pathExists: (p) => (0, import_node_fs54.existsSync)(p),
65641
65654
  // #5899: pin cleanup git calls to the main checkout — the task worktree this process may be
65642
65655
  // standing in is removed mid-cleanup, so a cwd-relative invocation fails with
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.6.47",
3
+ "version": "4.6.48",
4
4
  "description": "MMI Future CLI — the org dev toolbox and shared cross-IDE engine for every registry-declared MMI coding surface.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/claude-plugin",
3
- "version": "4.6.47",
3
+ "version": "4.6.48",
4
4
  "description": "MMI workflow skills and org gates delivery.",
5
5
  "author": {
6
6
  "name": "MMI Future",