@mutmutco/cli 4.0.13 → 4.0.15

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/main.cjs CHANGED
@@ -4510,6 +4510,11 @@ function formatPositionalTarget(commandPath3, argName, opts = {}) {
4510
4510
  if (concrete) return `mmi-cli ${commandPath3} ${concrete}`;
4511
4511
  return `mmi-cli ${commandPath3} <${argName}>`;
4512
4512
  }
4513
+ var FLAG_SYNONYMS = /* @__PURE__ */ new Map([["--outcome", "--reason"]]);
4514
+ function synonymFlagFor(flag, ownFlags) {
4515
+ const syn = FLAG_SYNONYMS.get(flag);
4516
+ return syn !== void 0 && ownFlags.includes(syn) ? syn : void 0;
4517
+ }
4513
4518
  function unknownTargetFlagMessage(flag, positional) {
4514
4519
  return `unknown option '${flag}' \u2014 this command takes its target as a positional: ${positional}`;
4515
4520
  }
@@ -10827,10 +10832,10 @@ var rollout_plan_default = {
10827
10832
  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)."
10828
10833
  },
10829
10834
  baseline: {
10830
- version: "4.0.13",
10831
- tag: "v4.0.13",
10832
- commit: "8491a7532553",
10833
- npm: "@mutmutco/cli@4.0.13"
10835
+ version: "4.0.15",
10836
+ tag: "v4.0.15",
10837
+ commit: "86f45af99b96",
10838
+ npm: "@mutmutco/cli@4.0.15"
10834
10839
  },
10835
10840
  exitCriterion: "fleet-n-of-n",
10836
10841
  hubOnlyShortcut: "forbidden",
@@ -10847,14 +10852,14 @@ var rollout_plan_default = {
10847
10852
  repo: "mutmutco/mmi-hub",
10848
10853
  role: "canary",
10849
10854
  schedule: "train",
10850
- v3Target: "v4.0.13"
10855
+ v3Target: "v4.0.15"
10851
10856
  }
10852
10857
  ],
10853
10858
  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.",
10854
10859
  rollback: {
10855
10860
  independent: true,
10856
- mechanism: "npm dist-tag latest -> 4.0.13 and redeploy the Hub Lambda from tag v4.0.13 (8491a7532553); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
10857
- v3Target: "v4.0.13 (@mutmutco/cli@4.0.13, tag commit 8491a7532553 \u2014 last known-good release carrying the repo-index v4-only contract)"
10861
+ mechanism: "npm dist-tag latest -> 4.0.15 and redeploy the Hub Lambda from tag v4.0.15 (86f45af99b96); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
10862
+ v3Target: "v4.0.15 (@mutmutco/cli@4.0.15, tag commit 86f45af99b96 \u2014 last known-good release carrying the repo-index v4-only contract)"
10858
10863
  }
10859
10864
  },
10860
10865
  {
@@ -17301,7 +17306,7 @@ async function executeWaveLand(plan, deps) {
17301
17306
  }
17302
17307
 
17303
17308
  // src/index.ts
17304
- var import_node_os18 = require("node:os");
17309
+ var import_node_os19 = require("node:os");
17305
17310
 
17306
17311
  // src/board.ts
17307
17312
  var import_node_child_process9 = require("node:child_process");
@@ -23224,6 +23229,7 @@ var import_node_crypto9 = require("node:crypto");
23224
23229
  var import_node_crypto8 = require("node:crypto");
23225
23230
  var import_node_child_process13 = require("node:child_process");
23226
23231
  var import_node_fs25 = require("node:fs");
23232
+ var import_node_os12 = require("node:os");
23227
23233
  var import_node_path23 = require("node:path");
23228
23234
 
23229
23235
  // src/repo-index-v4/chunks.ts
@@ -23478,7 +23484,15 @@ function runEmbedderOnce(cwd, chunks, modelDirectory, createdAt) {
23478
23484
  if (!(0, import_node_fs25.existsSync)(file)) return { ok: false, reason: "embeddings-unavailable" };
23479
23485
  const request = { texts: chunks.map((chunk) => ({ id: chunk.id, text: embeddingInput(cwd, chunk) })), maxBatch: V4_EMBED_BATCH };
23480
23486
  const env = { ...process.env, ...modelDirectory ? { MMI_REPO_INDEXER_MODEL_DIR: modelDirectory } : {} };
23481
- const result = (0, import_node_child_process13.spawnSync)(process.execPath, [file], { input: JSON.stringify(request), encoding: "utf8", windowsHide: true, timeout: V4_EMBED_TIMEOUT_MS, maxBuffer: V4_MAX_ARTIFACT_BYTES, env });
23487
+ const requestDir = (0, import_node_fs25.mkdtempSync)((0, import_node_path23.join)((0, import_node_os12.tmpdir)(), "mmi-repo-index-req-"));
23488
+ const requestFile = (0, import_node_path23.join)(requestDir, "request.json");
23489
+ (0, import_node_fs25.writeFileSync)(requestFile, JSON.stringify(request));
23490
+ let result;
23491
+ try {
23492
+ result = (0, import_node_child_process13.spawnSync)(process.execPath, [file, requestFile], { encoding: "utf8", windowsHide: true, timeout: V4_EMBED_TIMEOUT_MS, maxBuffer: V4_MAX_ARTIFACT_BYTES, env });
23493
+ } finally {
23494
+ (0, import_node_fs25.rmSync)(requestDir, { recursive: true, force: true });
23495
+ }
23482
23496
  if (result.error || result.status !== 0) {
23483
23497
  const cleanExit2 = result.error === void 0 && result.signal === void 0 && typeof result.status === "number" && result.status !== 0;
23484
23498
  const stdout = String(result.stdout).trim();
@@ -23500,7 +23514,7 @@ function runEmbedderOnce(cwd, chunks, modelDirectory, createdAt) {
23500
23514
  };
23501
23515
  }
23502
23516
  try {
23503
- const response = JSON.parse(result.stdout);
23517
+ const response = JSON.parse(String(result.stdout));
23504
23518
  if (!response.ok || !response.provenance || !Array.isArray(response.embeddings)) return { ok: false, reason: "embeddings-unavailable" };
23505
23519
  const provenance = {
23506
23520
  provider: response.provenance.provider,
@@ -23872,7 +23886,7 @@ async function gcRepoIndexCloud(deps) {
23872
23886
 
23873
23887
  // src/repo-index-sync.ts
23874
23888
  var import_node_fs27 = require("node:fs");
23875
- var import_node_os12 = require("node:os");
23889
+ var import_node_os13 = require("node:os");
23876
23890
  var import_node_path25 = require("node:path");
23877
23891
  var import_node_child_process14 = require("node:child_process");
23878
23892
 
@@ -24084,7 +24098,7 @@ async function syncEstateRepoIndex(opts) {
24084
24098
  }
24085
24099
  } catch {
24086
24100
  }
24087
- const dir = (0, import_node_fs27.mkdtempSync)((0, import_node_path25.join)((0, import_node_os12.tmpdir)(), "mmi-repo-index-"));
24101
+ const dir = (0, import_node_fs27.mkdtempSync)((0, import_node_path25.join)((0, import_node_os13.tmpdir)(), "mmi-repo-index-"));
24088
24102
  try {
24089
24103
  const reconciled = await reconcileRepoIndexCloud(repo, opts.deps);
24090
24104
  if (!reconciled.ok) {
@@ -25748,7 +25762,7 @@ function writeError(res) {
25748
25762
  // src/secrets-commands.ts
25749
25763
  var import_node_fs32 = require("node:fs");
25750
25764
  var import_node_path29 = require("node:path");
25751
- var import_node_os13 = require("node:os");
25765
+ var import_node_os14 = require("node:os");
25752
25766
 
25753
25767
  // src/secrets-diff.ts
25754
25768
  var TIMEOUT_MS2 = 8e3;
@@ -25871,7 +25885,7 @@ async function decryptRailsCredentials(input) {
25871
25885
  'config = ActiveSupport::EncryptedConfiguration.new(config_path: config_path, key_path: key_path, env_key: "RAILS_MASTER_KEY", raise_if_missing_key: true)',
25872
25886
  "puts JSON.generate(config.config)"
25873
25887
  ].join("\n");
25874
- const scriptDir = (0, import_node_fs32.mkdtempSync)((0, import_node_path29.join)((0, import_node_os13.tmpdir)(), "mmi-rails-decrypt-"));
25888
+ const scriptDir = (0, import_node_fs32.mkdtempSync)((0, import_node_path29.join)((0, import_node_os14.tmpdir)(), "mmi-rails-decrypt-"));
25875
25889
  const scriptPath = (0, import_node_path29.join)(scriptDir, "decrypt.rb");
25876
25890
  (0, import_node_fs32.writeFileSync)(scriptPath, script, "utf8");
25877
25891
  try {
@@ -27093,7 +27107,7 @@ function registerEdgeCommands(program3) {
27093
27107
 
27094
27108
  // src/bootstrap-commands.ts
27095
27109
  var import_node_fs34 = require("node:fs");
27096
- var import_node_os14 = require("node:os");
27110
+ var import_node_os15 = require("node:os");
27097
27111
  var import_node_path32 = require("node:path");
27098
27112
 
27099
27113
  // src/bootstrap-drift.ts
@@ -28297,7 +28311,7 @@ function registerBootstrapCommands(program3) {
28297
28311
  const readFile6 = (p) => (0, import_node_fs34.existsSync)(p) ? (0, import_node_fs34.readFileSync)(p, "utf8") : null;
28298
28312
  const enc = (p) => p.split("/").map(encodeURIComponent).join("/");
28299
28313
  const putSeed = async (target, content, ref, sha) => {
28300
- const tmp = (0, import_node_path32.join)((0, import_node_os14.tmpdir)(), `mmi-seed-${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}.json`);
28314
+ const tmp = (0, import_node_path32.join)((0, import_node_os15.tmpdir)(), `mmi-seed-${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}.json`);
28301
28315
  (0, import_node_fs34.writeFileSync)(tmp, JSON.stringify(contentPutBody(target, content, ref, sha)), "utf8");
28302
28316
  try {
28303
28317
  await gh(contentPutInputArgs(repo, target, tmp));
@@ -28768,7 +28782,7 @@ LIVE apply to ${repo}:
28768
28782
  } catch {
28769
28783
  existingSha = void 0;
28770
28784
  }
28771
- const tmp = (0, import_node_path32.join)((0, import_node_os14.tmpdir)(), `mmi-propagate-${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}.json`);
28785
+ const tmp = (0, import_node_path32.join)((0, import_node_os15.tmpdir)(), `mmi-propagate-${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}.json`);
28772
28786
  const desiredContent = desiredByRepo.get(rec.repo);
28773
28787
  if (desiredContent == null) return fail(`bootstrap propagate: no resolved content for ${rec.repo} ${seed.target} \u2014 refusing to write`);
28774
28788
  (0, import_node_fs34.writeFileSync)(tmp, JSON.stringify(contentPutBody(seed.target, desiredContent, branch, existingSha)), "utf8");
@@ -28941,7 +28955,7 @@ Rollback: \`mmi-cli devops bootstrap rollback ${rec.repo} --target ${seed.target
28941
28955
  } catch {
28942
28956
  existingSha = void 0;
28943
28957
  }
28944
- const tmp = (0, import_node_path32.join)((0, import_node_os14.tmpdir)(), `mmi-rollback-${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}.json`);
28958
+ const tmp = (0, import_node_path32.join)((0, import_node_os15.tmpdir)(), `mmi-rollback-${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}.json`);
28945
28959
  (0, import_node_fs34.writeFileSync)(tmp, JSON.stringify(contentPutBody(seed.target, preSeedContent, plan.branch, existingSha)), "utf8");
28946
28960
  try {
28947
28961
  await gh(contentPutInputArgs(repo, seed.target, tmp));
@@ -29452,7 +29466,7 @@ function registerStageCommands(program3) {
29452
29466
  // src/merge-cleanup.ts
29453
29467
  var import_node_fs37 = require("node:fs");
29454
29468
  var import_node_path35 = require("node:path");
29455
- var import_node_os15 = require("node:os");
29469
+ var import_node_os16 = require("node:os");
29456
29470
 
29457
29471
  // src/config-load.ts
29458
29472
  var discoveredConfig = null;
@@ -29648,13 +29662,13 @@ async function resolveBoardAdvanceForPr(prNumber, repoOption) {
29648
29662
  },
29649
29663
  // #5317: after a successful move, re-read the board to verify Done actually holds — a move the API
29650
29664
  // reported but the board did not reflect is named as left behind, never silently dropped.
29665
+ // #5358: verify against the item DIRECTLY (fetchIssueProjectItem, the same read `board show` uses),
29666
+ // never the active-board view — a just-Done item has already left the buckets readBoard partitions,
29667
+ // so a board-view lookup reports every successful advance as "not found".
29651
29668
  readIssueStatus: async (ref) => {
29652
- const number = Number(ref.replace(/^#/, ""));
29653
- if (!Number.isInteger(number) || number <= 0 || !repo) return { error: `unusable ref ${ref}` };
29654
29669
  try {
29655
- const board = await readBoard({ config: await loadConfigForBoardSelector2(ref, repoOption), repo: repoOption });
29656
- const buckets = [...board.primary.userOwned, ...board.primary.claimable, ...board.primary.taken, ...board.primary.unownedInFlight, ...board.secondary.userOwned, ...board.secondary.claimable, ...board.secondary.taken, ...board.secondary.unownedInFlight];
29657
- const item = buckets.find((candidate2) => candidate2.repository.toLowerCase() === repo.toLowerCase() && candidate2.number === number);
29670
+ const cfg = resolveBoardConfig(await loadConfigForBoardSelector2(ref, repoOption));
29671
+ const { item } = await fetchIssueProjectItem(defaultGitHubClient(), cfg, parseIssueSelector(ref, repo));
29658
29672
  return item ? { status: item.status } : { error: `issue ${ref} not found on the board after advance` };
29659
29673
  } catch (e) {
29660
29674
  return { error: e.message };
@@ -29716,7 +29730,7 @@ async function composeOverrideBodyFile(prNumber, repoArgs, gh) {
29716
29730
  const commits = JSON.parse(raw).commits ?? [];
29717
29731
  const body = squashBodyWithOverride(commits.map((c) => ({ headline: c.messageHeadline ?? "", body: c.messageBody ?? "" })), process.cwd());
29718
29732
  if (!body) return void 0;
29719
- const dir = (0, import_node_fs37.mkdtempSync)((0, import_node_path35.join)((0, import_node_os15.tmpdir)(), "mmi-squash-body-"));
29733
+ const dir = (0, import_node_fs37.mkdtempSync)((0, import_node_path35.join)((0, import_node_os16.tmpdir)(), "mmi-squash-body-"));
29720
29734
  const path2 = (0, import_node_path35.join)(dir, "body.txt");
29721
29735
  (0, import_node_fs37.writeFileSync)(path2, `${body}
29722
29736
  `, "utf8");
@@ -31527,7 +31541,7 @@ function registerDeployCommands(program3) {
31527
31541
 
31528
31542
  // src/discovery-commands.ts
31529
31543
  var import_node_fs40 = require("node:fs");
31530
- var import_node_os16 = require("node:os");
31544
+ var import_node_os17 = require("node:os");
31531
31545
  var import_node_path37 = require("node:path");
31532
31546
  var GC_GH_TIMEOUT_MS2 = 2e4;
31533
31547
  async function collectStatus() {
@@ -31728,7 +31742,7 @@ async function collectOnboardStatus(opts = {}) {
31728
31742
  else if (top) nextCommand = `mmi-cli oracle board claim ${top.number} # ${top.title}`;
31729
31743
  else nextCommand = "mmi-cli oracle board read \u2014 no claimable items found";
31730
31744
  }
31731
- const home = (0, import_node_os16.homedir)();
31745
+ const home = (0, import_node_os17.homedir)();
31732
31746
  const plugin = onboardPluginGate({
31733
31747
  readKnown: () => readFileSyncSafe((0, import_node_path37.join)(home, ...KNOWN_MARKETPLACES_RELATIVE), import_node_fs40.readFileSync),
31734
31748
  readSettings: () => readFileSyncSafe((0, import_node_path37.join)(home, ".claude", "settings.json"), import_node_fs40.readFileSync)
@@ -32723,10 +32737,6 @@ var surfaces_default = {
32723
32737
  releaseMetadata: {
32724
32738
  ownerPath: "surfaces.json",
32725
32739
  bomPath: "distribution-bom.json"
32726
- },
32727
- soul: {
32728
- ownerPath: "prompts/soul.md",
32729
- sourceSurfaceId: "mmi-soul"
32730
32740
  }
32731
32741
  },
32732
32742
  agentSurfaces: [
@@ -32738,7 +32748,6 @@ var surfaces_default = {
32738
32748
  "mmi-claude-plugin",
32739
32749
  "mmi-claude-marketplace",
32740
32750
  "mmi-skills",
32741
- "mmi-soul",
32742
32751
  "mmi-hook-policy",
32743
32752
  "mmi-hooks",
32744
32753
  "mmi-cli"
@@ -32753,14 +32762,6 @@ var surfaces_default = {
32753
32762
  sourcePath: "skills",
32754
32763
  targetPath: "packages/claude-plugin/skills"
32755
32764
  },
32756
- {
32757
- mode: "files",
32758
- sourcePath: "prompts",
32759
- targetPath: "packages/claude-plugin/prompts",
32760
- include: [
32761
- "soul.md"
32762
- ]
32763
- },
32764
32765
  {
32765
32766
  mode: "files",
32766
32767
  sourcePath: "hooks",
@@ -32874,7 +32875,6 @@ var surfaces_default = {
32874
32875
  artifactIds: [
32875
32876
  "mmi-codex-plugin",
32876
32877
  "mmi-skills",
32877
- "mmi-soul",
32878
32878
  "mmi-hook-policy",
32879
32879
  "mmi-cli"
32880
32880
  ],
@@ -32888,14 +32888,6 @@ var surfaces_default = {
32888
32888
  sourcePath: "skills",
32889
32889
  targetPath: "packages/codex-plugin/skills"
32890
32890
  },
32891
- {
32892
- mode: "files",
32893
- sourcePath: "prompts",
32894
- targetPath: "packages/codex-plugin/prompts",
32895
- include: [
32896
- "soul.md"
32897
- ]
32898
- },
32899
32891
  {
32900
32892
  mode: "files",
32901
32893
  sourcePath: "hooks",
@@ -33009,7 +33001,6 @@ var surfaces_default = {
33009
33001
  artifactIds: [
33010
33002
  "mmi-kimi-plugin",
33011
33003
  "mmi-skills",
33012
- "mmi-soul",
33013
33004
  "mmi-hook-policy",
33014
33005
  "mmi-cli"
33015
33006
  ],
@@ -33023,14 +33014,6 @@ var surfaces_default = {
33023
33014
  sourcePath: "skills",
33024
33015
  targetPath: "packages/kimi-plugin/skills"
33025
33016
  },
33026
- {
33027
- mode: "files",
33028
- sourcePath: "prompts",
33029
- targetPath: "packages/kimi-plugin/prompts",
33030
- include: [
33031
- "soul.md"
33032
- ]
33033
- },
33034
33017
  {
33035
33018
  mode: "files",
33036
33019
  sourcePath: "scripts",
@@ -33136,7 +33119,6 @@ var surfaces_default = {
33136
33119
  artifactIds: [
33137
33120
  "mmi-cursor-plugin",
33138
33121
  "mmi-skills",
33139
- "mmi-soul",
33140
33122
  "mmi-hook-policy",
33141
33123
  "mmi-cli"
33142
33124
  ],
@@ -33150,14 +33132,6 @@ var surfaces_default = {
33150
33132
  sourcePath: "skills",
33151
33133
  targetPath: "packages/cursor-plugin/skills"
33152
33134
  },
33153
- {
33154
- mode: "files",
33155
- sourcePath: "prompts",
33156
- targetPath: "packages/cursor-plugin/prompts",
33157
- include: [
33158
- "soul.md"
33159
- ]
33160
- },
33161
33135
  {
33162
33136
  mode: "files",
33163
33137
  sourcePath: "hooks",
@@ -33270,7 +33244,6 @@ var surfaces_default = {
33270
33244
  displayName: "Kilo Code",
33271
33245
  lifecycle: "active",
33272
33246
  artifactIds: [
33273
- "mmi-soul",
33274
33247
  "mmi-kilo-plugin",
33275
33248
  "mmi-kilo-skills",
33276
33249
  "mmi-hook-policy",
@@ -33289,14 +33262,6 @@ var surfaces_default = {
33289
33262
  "_"
33290
33263
  ]
33291
33264
  },
33292
- {
33293
- mode: "files",
33294
- sourcePath: "prompts",
33295
- targetPath: ".kilo-plugin/prompts",
33296
- include: [
33297
- "soul.md"
33298
- ]
33299
- },
33300
33265
  {
33301
33266
  mode: "files",
33302
33267
  sourcePath: "scripts",
@@ -33382,7 +33347,6 @@ var surfaces_default = {
33382
33347
  artifactIds: [
33383
33348
  "mmi-pi-plugin",
33384
33349
  "mmi-skills",
33385
- "mmi-soul",
33386
33350
  "mmi-cli",
33387
33351
  "mmi-hook-policy"
33388
33352
  ],
@@ -33399,14 +33363,6 @@ var surfaces_default = {
33399
33363
  "_"
33400
33364
  ]
33401
33365
  },
33402
- {
33403
- mode: "files",
33404
- sourcePath: "prompts",
33405
- targetPath: ".pi-plugin/prompts",
33406
- include: [
33407
- "soul.md"
33408
- ]
33409
- },
33410
33366
  {
33411
33367
  mode: "files",
33412
33368
  sourcePath: "pi-plugin/extensions",
@@ -33501,7 +33457,6 @@ var surfaces_default = {
33501
33457
  artifactIds: [
33502
33458
  "mmi-hermes-plugin",
33503
33459
  "mmi-skills",
33504
- "mmi-soul",
33505
33460
  "mmi-cli",
33506
33461
  "mmi-hook-policy"
33507
33462
  ],
@@ -33515,14 +33470,6 @@ var surfaces_default = {
33515
33470
  sourcePath: "skills",
33516
33471
  targetPath: "packages/hermes-plugin/skills"
33517
33472
  },
33518
- {
33519
- mode: "files",
33520
- sourcePath: "prompts",
33521
- targetPath: "packages/hermes-plugin/prompts",
33522
- include: [
33523
- "soul.md"
33524
- ]
33525
- },
33526
33473
  {
33527
33474
  mode: "files",
33528
33475
  sourcePath: "scripts",
@@ -33642,39 +33589,6 @@ var surfaces_default = {
33642
33589
  ],
33643
33590
  publishVisibility: "public"
33644
33591
  },
33645
- {
33646
- id: "mmi-soul",
33647
- classification: "capability",
33648
- kind: "spine",
33649
- ownerPath: "prompts/soul.md",
33650
- deliveryPath: "prompts/soul.md",
33651
- delivery: "plugin-install",
33652
- applicability: "plugin-enabled agent surfaces; opaque JervCode soul mirror, not a host-invocable prompt.",
33653
- versionCoordinated: true,
33654
- versionPaths: [
33655
- {
33656
- path: "cli/package.json",
33657
- pointer: "version"
33658
- }
33659
- ],
33660
- artifactIdentity: {
33661
- kind: "sha256-tree",
33662
- paths: [
33663
- "prompts/soul.md"
33664
- ]
33665
- },
33666
- verify: [
33667
- {
33668
- command: "node",
33669
- args: [
33670
- "scripts/check-soul-payload.mjs",
33671
- "--contract"
33672
- ],
33673
- expected: "soul payload check: ok"
33674
- }
33675
- ],
33676
- publishVisibility: "public"
33677
- },
33678
33592
  {
33679
33593
  id: "mmi-claude-plugin",
33680
33594
  classification: "packaging",
@@ -35492,7 +35406,7 @@ function ghAccountCaveat(announcedLogin, accounts) {
35492
35406
 
35493
35407
  // src/doctor-io.ts
35494
35408
  var import_node_fs41 = require("node:fs");
35495
- var import_node_os17 = require("node:os");
35409
+ var import_node_os18 = require("node:os");
35496
35410
  var import_node_path38 = require("node:path");
35497
35411
  var import_node_child_process18 = require("node:child_process");
35498
35412
  var import_node_util8 = require("node:util");
@@ -35501,7 +35415,7 @@ var MMI_PLUGIN_ID2 = "mmi@mutmutco";
35501
35415
  function installedClaudePluginVersion() {
35502
35416
  try {
35503
35417
  const file = JSON.parse(
35504
- (0, import_node_fs41.readFileSync)((0, import_node_path38.join)((0, import_node_os17.homedir)(), ".claude", "plugins", "installed_plugins.json"), "utf8")
35418
+ (0, import_node_fs41.readFileSync)((0, import_node_path38.join)((0, import_node_os18.homedir)(), ".claude", "plugins", "installed_plugins.json"), "utf8")
35505
35419
  );
35506
35420
  const versions = (file.plugins?.[MMI_PLUGIN_ID2] ?? []).map((r) => r.version).filter((v) => Boolean(v));
35507
35421
  if (versions.length === 0) return void 0;
@@ -35561,7 +35475,7 @@ function installedSurfacePluginVersion(surface) {
35561
35475
  const token = surfaceToken(surface);
35562
35476
  if (token === "kilo") {
35563
35477
  try {
35564
- const stamp = (0, import_node_fs41.readFileSync)((0, import_node_path38.join)((0, import_node_os17.homedir)(), ".kilo", ".mmi-kilo-version"), "utf8").trim();
35478
+ const stamp = (0, import_node_fs41.readFileSync)((0, import_node_path38.join)((0, import_node_os18.homedir)(), ".kilo", ".mmi-kilo-version"), "utf8").trim();
35565
35479
  return stamp || void 0;
35566
35480
  } catch {
35567
35481
  return void 0;
@@ -35805,7 +35719,7 @@ function envHealLockPath(home) {
35805
35719
  async function withEnvHealLock(what, run) {
35806
35720
  try {
35807
35721
  return await withFileLock(
35808
- envHealLockPath((0, import_node_os18.homedir)()),
35722
+ envHealLockPath((0, import_node_os19.homedir)()),
35809
35723
  { staleMs: ENV_HEAL_LOCK_STALE_MS, maxWaitMs: ENV_HEAL_LOCK_MAX_WAIT_MS, label: "mmi env-heal lock" },
35810
35724
  run
35811
35725
  );
@@ -35900,7 +35814,7 @@ function mmiDoctorDeps(opts = {}) {
35900
35814
  const configRoot = surfaceConfigRoot(surface);
35901
35815
  const running = surface === "codex" ? installedActivePluginVersion(surface) : runningPluginVersion(process.env, resolveClientVersion());
35902
35816
  const plan = buildPluginCachePlan(
35903
- (0, import_node_os18.homedir)(),
35817
+ (0, import_node_os19.homedir)(),
35904
35818
  running,
35905
35819
  pluginCacheFsDeps(configRoot, () => 0),
35906
35820
  { configRoot, includeStaging: surface !== "codex" }
@@ -35928,7 +35842,7 @@ function mmiDoctorDeps(opts = {}) {
35928
35842
  const running = surface === "codex" ? installedActivePluginVersion(surface) : runningPluginVersion(process.env, resolveClientVersion());
35929
35843
  const installed = installedActivePluginVersion(surface);
35930
35844
  const plan = buildPluginCachePlan(
35931
- (0, import_node_os18.homedir)(),
35845
+ (0, import_node_os19.homedir)(),
35932
35846
  running,
35933
35847
  pluginCacheFsDeps(configRoot, () => 0),
35934
35848
  { configRoot, includeStaging: surface !== "codex", installedVersion: installed }
@@ -36269,7 +36183,8 @@ function envelopeAwareWriteErr(str) {
36269
36183
  const invoked = resolveCommandFromArgv(program2, argv);
36270
36184
  const positional = TARGET_SELECTOR_FLAGS.has(flag) ? positionalTargetForm(invoked, { flag, argv }) : void 0;
36271
36185
  if (argvWantsJson2()) {
36272
- const suggestion = positional ? void 0 : didYouMean(flag, commandOwnLongFlags(invoked));
36186
+ const ownFlags = commandOwnLongFlags(invoked);
36187
+ const suggestion = positional ? void 0 : didYouMean(flag, ownFlags) ?? synonymFlagFor(flag, ownFlags);
36273
36188
  const corrected = suggestion ? `mmi-cli ${canonicalArgvFor(argv.map((a) => a === flag ? suggestion : a)).join(" ")}` : void 0;
36274
36189
  const message = positional ? unknownTargetFlagMessage(flag, positional) : `unknown option '${flag}'`;
36275
36190
  process.stderr.write(
@@ -39025,7 +38940,7 @@ program2.command("plugin-prune").description(`prune stale cached MMI plugin vers
39025
38940
  return;
39026
38941
  }
39027
38942
  const plan = buildPluginCachePlan(
39028
- (0, import_node_os18.homedir)(),
38943
+ (0, import_node_os19.homedir)(),
39029
38944
  running,
39030
38945
  pluginCacheFsDeps(configRoot, directoryBytes),
39031
38946
  { withBytes: true, configRoot, includeStaging: surface !== "codex" }
@@ -371,6 +371,7 @@ var REPO_INDEX_V4_SCHEMA = 4;
371
371
  var import_node_crypto3 = require("node:crypto");
372
372
  var import_node_child_process3 = require("node:child_process");
373
373
  var import_node_fs3 = require("node:fs");
374
+ var import_node_os2 = require("node:os");
374
375
  var import_node_path4 = require("node:path");
375
376
  var V4_MAX_CHUNKS = 1e4;
376
377
  var V4_MAX_ARTIFACT_BYTES = 64 * 1024 * 1024;
@@ -448,7 +449,15 @@ function runEmbedderOnce(cwd, chunks, modelDirectory, createdAt) {
448
449
  if (!(0, import_node_fs3.existsSync)(file)) return { ok: false, reason: "embeddings-unavailable" };
449
450
  const request = { texts: chunks.map((chunk) => ({ id: chunk.id, text: embeddingInput(cwd, chunk) })), maxBatch: V4_EMBED_BATCH };
450
451
  const env = { ...process.env, ...modelDirectory ? { MMI_REPO_INDEXER_MODEL_DIR: modelDirectory } : {} };
451
- const result = (0, import_node_child_process3.spawnSync)(process.execPath, [file], { input: JSON.stringify(request), encoding: "utf8", windowsHide: true, timeout: V4_EMBED_TIMEOUT_MS, maxBuffer: V4_MAX_ARTIFACT_BYTES, env });
452
+ const requestDir = (0, import_node_fs3.mkdtempSync)((0, import_node_path4.join)((0, import_node_os2.tmpdir)(), "mmi-repo-index-req-"));
453
+ const requestFile = (0, import_node_path4.join)(requestDir, "request.json");
454
+ (0, import_node_fs3.writeFileSync)(requestFile, JSON.stringify(request));
455
+ let result;
456
+ try {
457
+ result = (0, import_node_child_process3.spawnSync)(process.execPath, [file, requestFile], { encoding: "utf8", windowsHide: true, timeout: V4_EMBED_TIMEOUT_MS, maxBuffer: V4_MAX_ARTIFACT_BYTES, env });
458
+ } finally {
459
+ (0, import_node_fs3.rmSync)(requestDir, { recursive: true, force: true });
460
+ }
452
461
  if (result.error || result.status !== 0) {
453
462
  const cleanExit = result.error === void 0 && result.signal === void 0 && typeof result.status === "number" && result.status !== 0;
454
463
  const stdout = String(result.stdout).trim();
@@ -470,7 +479,7 @@ function runEmbedderOnce(cwd, chunks, modelDirectory, createdAt) {
470
479
  };
471
480
  }
472
481
  try {
473
- const response = JSON.parse(result.stdout);
482
+ const response = JSON.parse(String(result.stdout));
474
483
  if (!response.ok || !response.provenance || !Array.isArray(response.embeddings)) return { ok: false, reason: "embeddings-unavailable" };
475
484
  const provenance = {
476
485
  provider: response.provenance.provider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.0.13",
3
+ "version": "4.0.15",
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",