@mutmutco/cli 2.32.1 → 2.32.2

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 +23 -3
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -8567,7 +8567,7 @@ function detectSurface(env) {
8567
8567
  if (env.MMI_AGENT_SURFACE === "codex" || has("CODEX_HOME") || (env.CLAUDE_PLUGIN_ROOT ?? "").includes(".codex")) {
8568
8568
  return "codex";
8569
8569
  }
8570
- if (env.MMI_AGENT_SURFACE === "cursor" || has("CURSOR_TRACE_ID") || has("CURSOR_USER") || has("CURSOR_SESSION_ID")) {
8570
+ if (env.MMI_AGENT_SURFACE === "cursor" || has("CURSOR_TRACE_ID") || has("CURSOR_USER") || has("CURSOR_SESSION_ID") || env.CURSOR_AGENT === "1" || has("CURSOR_EXTENSION_HOST_ROLE")) {
8571
8571
  return "cursor";
8572
8572
  }
8573
8573
  const isClaude = has("CLAUDECODE") || has("CLAUDE_CODE_ENTRYPOINT") || has("CLAUDE_PLUGIN_ROOT") || env.MMI_AGENT_SURFACE === "claude";
@@ -8689,6 +8689,7 @@ function buildInstalledPluginVersionCheck(input) {
8689
8689
  pluginId
8690
8690
  };
8691
8691
  if (!input.isOrgRepo || !isSemverVersion(input.releasedVersion)) return base2;
8692
+ if (input.surface === "cursor") return base2;
8692
8693
  const stale = [];
8693
8694
  let sawRecord = false;
8694
8695
  let currentVersion;
@@ -8775,6 +8776,16 @@ function buildCursorPluginInstallCheck(input) {
8775
8776
  };
8776
8777
  }
8777
8778
  }
8779
+ if (input.surface === "cursor" && isSemverVersion(input.releasedVersion) && input.pins.some((pin) => isSemverVersion(pin.version) && compareVersions(pin.version, input.releasedVersion) < 0)) {
8780
+ const stale = input.pins.filter((pin) => isSemverVersion(pin.version) && compareVersions(pin.version, input.releasedVersion) < 0).map((pin) => `${pin.version} at ${pin.name}`).join(", ");
8781
+ return {
8782
+ ...base2,
8783
+ ok: false,
8784
+ cacheRoot: input.cacheRoot,
8785
+ pins: input.pins,
8786
+ fix: `Cursor MMI plugin cache is behind ${input.releasedVersion} (${stale}) \u2014 in Cursor Dashboard \u2192 Settings \u2192 Plugins, click Update next to the MMI Team Marketplace, enable MMI, then restart Cursor; ${CURSOR_MARKETPLACE_INSTALL_GUIDE}`
8787
+ };
8788
+ }
8778
8789
  return { ...base2, cacheRoot: input.cacheRoot, pins: input.pins };
8779
8790
  }
8780
8791
  function buildCursorHookCliCheck(input) {
@@ -15640,6 +15651,13 @@ function cursorPluginCachePinSnapshots() {
15640
15651
  const pluginJson = (0, import_node_path13.join)(path2, ".cursor-plugin", "plugin.json");
15641
15652
  const hooksJson = (0, import_node_path13.join)(path2, "hooks", "hooks.json");
15642
15653
  const cliBundle = (0, import_node_path13.join)(path2, "cli", "dist", "index.cjs");
15654
+ let version;
15655
+ try {
15656
+ const raw = JSON.parse((0, import_node_fs14.readFileSync)(pluginJson, "utf8"));
15657
+ version = typeof raw.version === "string" ? raw.version : void 0;
15658
+ } catch {
15659
+ version = void 0;
15660
+ }
15643
15661
  let isEmpty = true;
15644
15662
  try {
15645
15663
  isEmpty = (0, import_node_fs14.readdirSync)(path2).length === 0;
@@ -15652,7 +15670,8 @@ function cursorPluginCachePinSnapshots() {
15652
15670
  hasPluginJson: (0, import_node_fs14.existsSync)(pluginJson),
15653
15671
  hasHooksJson: (0, import_node_fs14.existsSync)(hooksJson),
15654
15672
  hasCliBundle: (0, import_node_fs14.existsSync)(cliBundle),
15655
- isEmpty
15673
+ isEmpty,
15674
+ version
15656
15675
  };
15657
15676
  });
15658
15677
  } catch {
@@ -15933,7 +15952,8 @@ async function runDoctor(opts, io = consoleIo) {
15933
15952
  cacheRoot: cursorCacheRoot,
15934
15953
  cacheRootExists: (0, import_node_fs14.existsSync)(cursorCacheRoot),
15935
15954
  pins: cursorPluginCachePinSnapshots() ?? [],
15936
- hubCheckout: hubCheckoutForCursorSeed()
15955
+ hubCheckout: hubCheckoutForCursorSeed(),
15956
+ releasedVersion
15937
15957
  })
15938
15958
  );
15939
15959
  const cursorPins = cursorPluginCachePinSnapshots() ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "2.32.1",
3
+ "version": "2.32.2",
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",