@mutmutco/cli 2.48.1 → 2.48.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 +51 -0
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -18196,6 +18196,29 @@ function buildOpencodeVersionCheck(input) {
18196
18196
  }
18197
18197
  return { ...base, ok: false, installedVersion: input.installedVersion, releasedVersion: input.releasedVersion };
18198
18198
  }
18199
+ var OPENCODE_DESKTOP_BOOTSTRAP_LABEL = "OpenCode Desktop stale project bootstrap";
18200
+ var OPENCODE_DESKTOP_BOOTSTRAP_FIX = "OpenCode Desktop is bootstrapping a deleted MMI worktree; open an existing checkout in OpenCode, remove/select away from the stale project entry, then restart OpenCode";
18201
+ function decodeLogUrlDirectory(value) {
18202
+ try {
18203
+ return decodeURIComponent(value.replace(/\+/g, " "));
18204
+ } catch {
18205
+ return value;
18206
+ }
18207
+ }
18208
+ function opencodeAgentDirectoriesFromLog(text) {
18209
+ const found = /* @__PURE__ */ new Set();
18210
+ const re = /opencode server GET\s+http:\/\/127\.0\.0\.1:\d+\/agent\?directory=([^\s]+)\s+→\s+503\s+Service Unavailable/g;
18211
+ for (const match of text.matchAll(re)) {
18212
+ if (match[1]) found.add(decodeLogUrlDirectory(match[1]));
18213
+ }
18214
+ return [...found];
18215
+ }
18216
+ function buildOpencodeDesktopBootstrapCheck(input) {
18217
+ const base = { ok: true, label: OPENCODE_DESKTOP_BOOTSTRAP_LABEL, fix: OPENCODE_DESKTOP_BOOTSTRAP_FIX };
18218
+ if (!input.isOrgRepo || input.surface !== "opencode" || input.issues.length === 0) return base;
18219
+ const dirs = input.issues.map((i) => i.directory).join(", ");
18220
+ return { ...base, ok: false, fix: `${OPENCODE_DESKTOP_BOOTSTRAP_FIX} (stale: ${dirs})`, issues: [...input.issues] };
18221
+ }
18199
18222
  var CURSOR_PLUGIN_INSTALL_LABEL = "Cursor Team Marketplace plugin install";
18200
18223
  var CURSOR_MARKETPLACE_INSTALL_GUIDE = "https://github.com/mutmutco/MMI-Hub/blob/development/docs/Guides/cursor-marketplace-install.md";
18201
18224
  var CURSOR_PLUGIN_JSON_REL = ".cursor-plugin/plugin.json";
@@ -18867,6 +18890,29 @@ function backupAndWriteInstalledPlugins(records, pluginId) {
18867
18890
  return false;
18868
18891
  }
18869
18892
  }
18893
+ function opencodeDesktopLogsRoot() {
18894
+ if (process.platform === "win32") {
18895
+ const base = process.env.APPDATA || (0, import_node_path22.join)((0, import_node_os5.homedir)(), "AppData", "Roaming");
18896
+ return (0, import_node_path22.join)(base, "ai.opencode.desktop", "logs");
18897
+ }
18898
+ if (process.platform === "darwin") {
18899
+ return (0, import_node_path22.join)((0, import_node_os5.homedir)(), "Library", "Application Support", "ai.opencode.desktop", "logs");
18900
+ }
18901
+ return (0, import_node_path22.join)((0, import_node_os5.homedir)(), ".config", "ai.opencode.desktop", "logs");
18902
+ }
18903
+ function opencodeDesktopBootstrapSnapshot() {
18904
+ const root = opencodeDesktopLogsRoot();
18905
+ try {
18906
+ const sessionDirs = (0, import_node_fs26.readdirSync)(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => (0, import_node_path22.join)(root, entry.name)).sort((a, b) => (0, import_node_fs26.statSync)(b).mtimeMs - (0, import_node_fs26.statSync)(a).mtimeMs);
18907
+ const newest = sessionDirs[0];
18908
+ if (!newest) return [];
18909
+ const logPath = (0, import_node_path22.join)(newest, "renderer.log");
18910
+ const text = (0, import_node_fs26.readFileSync)(logPath, "utf8");
18911
+ return opencodeAgentDirectoriesFromLog(text).filter((directory) => !(0, import_node_fs26.existsSync)(directory)).map((directory) => ({ directory, logPath }));
18912
+ } catch {
18913
+ return [];
18914
+ }
18915
+ }
18870
18916
  function cursorPluginCacheRoot() {
18871
18917
  return (0, import_node_path22.join)((0, import_node_os5.homedir)(), ".cursor", "plugins", "cache", "mutmutco", "mmi");
18872
18918
  }
@@ -19295,6 +19341,11 @@ async function runDoctor(opts, io = consoleIo) {
19295
19341
  installedVersion: process.env.MMI_OPENCODE_PLUGIN_VERSION,
19296
19342
  releasedVersion
19297
19343
  }));
19344
+ checks.push(buildOpencodeDesktopBootstrapCheck({
19345
+ isOrgRepo: Boolean(cfg.sagaApiUrl),
19346
+ surface,
19347
+ issues: opencodeDesktopBootstrapSnapshot()
19348
+ }));
19298
19349
  }
19299
19350
  let cacheCleanupCheck = buildMmiPluginCacheCleanupCheck({
19300
19351
  isOrgRepo: Boolean(cfg.sagaApiUrl),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "2.48.1",
3
+ "version": "2.48.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",