@mutmutco/cli 4.5.208 → 4.5.209

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 +97 -10
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -1598,13 +1598,15 @@ __export(index_exports, {
1598
1598
  commandOwnLongFlags: () => commandOwnLongFlags,
1599
1599
  envHealLockPath: () => envHealLockPath,
1600
1600
  isOrgRegisteredRepo: () => isOrgRegisteredRepo,
1601
+ normalizeBoardClaimIssueArgv: () => normalizeBoardClaimIssueArgv,
1601
1602
  parseInvalidChoiceError: () => parseInvalidChoiceError,
1602
1603
  positionalTargetForm: () => positionalTargetForm,
1603
1604
  registryClientDeps: () => registryClientDeps,
1604
1605
  repoSlug: () => repoSlug,
1605
1606
  suggestCommandPath: () => suggestCommandPath,
1606
1607
  unknownCommandCandidates: () => unknownCommandCandidates,
1607
- unknownCommandTail: () => unknownCommandTail
1608
+ unknownCommandTail: () => unknownCommandTail,
1609
+ workboardClaimRecovery: () => workboardClaimRecovery
1608
1610
  });
1609
1611
  module.exports = __toCommonJS(index_exports);
1610
1612
 
@@ -6350,6 +6352,81 @@ function boardClaimStatusFlagRecovery(flag, canonicalPath, argv) {
6350
6352
  corrected: `mmi-cli ${kept.join(" ")}`
6351
6353
  };
6352
6354
  }
6355
+ var BOARD_CLAIM_OWN_FLAGS = ["--repo", "--for", "--force", "--check", "--allow-partial", "--json"];
6356
+ function splitInlineSelectors(argv, flags) {
6357
+ const out = [];
6358
+ for (const tok of argv) {
6359
+ const eq = tok.indexOf("=");
6360
+ if (tok.startsWith("--") && eq > 0 && flags.includes(tok.slice(0, eq))) {
6361
+ out.push(tok.slice(0, eq), tok.slice(eq + 1));
6362
+ } else {
6363
+ out.push(tok);
6364
+ }
6365
+ }
6366
+ return out;
6367
+ }
6368
+ function workboardClaimRecovery(unknownToken, argv, paths, ownFlags = BOARD_CLAIM_OWN_FLAGS) {
6369
+ if (unknownToken !== "workboard") return void 0;
6370
+ const catalog = [...paths];
6371
+ if (!catalog.includes("oracle board claim") && !catalog.includes("board claim")) return void 0;
6372
+ const tail = unknownCommandTail(argv, "workboard");
6373
+ if (tail[0] !== "claim") return void 0;
6374
+ const canonicalPath = "oracle board claim";
6375
+ const positionals = tail.slice(1);
6376
+ let corrected;
6377
+ if (positionals.length > 0) {
6378
+ corrected = [`mmi-cli ${canonicalPath}`, ...positionals, ...survivingFlagArgs(argv, "", ownFlags)].join(" ");
6379
+ } else {
6380
+ const normalized = splitInlineSelectors(argv, ["--issue", "--number"]);
6381
+ const usedFlag = normalized.includes("--issue") ? "--issue" : normalized.includes("--number") ? "--number" : "--issue";
6382
+ corrected = formatPositionalTarget(canonicalPath, "issues", { flag: usedFlag, argv: normalized, ownFlags });
6383
+ }
6384
+ return { canonicalPath, corrected, hint: `did you mean \`${corrected}\`?` };
6385
+ }
6386
+ var BOARD_CLAIM_VALUE_FLAGS = /* @__PURE__ */ new Set(["--repo", "--for", "--status"]);
6387
+ var BOARD_CLAIM_BOOLEAN_FLAGS = /* @__PURE__ */ new Set(["--json", "--force", "--check", "--allow-partial", "--help", "-h"]);
6388
+ function normalizeBoardClaimIssueArgv(argv) {
6389
+ let claimAt;
6390
+ if (argv[2] === "board" && argv[3] === "claim") claimAt = 3;
6391
+ else if (argv[2] === "oracle" && argv[3] === "board" && argv[4] === "claim") claimAt = 4;
6392
+ else return false;
6393
+ let issueAt = -1;
6394
+ let issueSpan = 0;
6395
+ let value;
6396
+ for (let i = claimAt + 1; i < argv.length; i += 1) {
6397
+ const tok = argv[i];
6398
+ if (tok === "--issue" || tok.startsWith("--issue=")) {
6399
+ if (issueAt >= 0) return false;
6400
+ issueAt = i;
6401
+ if (tok === "--issue") {
6402
+ const next = argv[i + 1];
6403
+ if (next === void 0 || next === "" || next.startsWith("-")) return false;
6404
+ value = next;
6405
+ issueSpan = 2;
6406
+ i += 1;
6407
+ } else {
6408
+ value = tok.slice("--issue=".length);
6409
+ if (value === "" || value.startsWith("-")) return false;
6410
+ issueSpan = 1;
6411
+ }
6412
+ continue;
6413
+ }
6414
+ if (tok.startsWith("-")) {
6415
+ const name = tok.includes("=") ? tok.slice(0, tok.indexOf("=")) : tok;
6416
+ if (BOARD_CLAIM_VALUE_FLAGS.has(name)) {
6417
+ if (!tok.includes("=") && argv[i + 1] !== void 0 && !argv[i + 1].startsWith("-")) i += 1;
6418
+ continue;
6419
+ }
6420
+ if (BOARD_CLAIM_BOOLEAN_FLAGS.has(tok)) continue;
6421
+ return false;
6422
+ }
6423
+ return false;
6424
+ }
6425
+ if (issueAt < 0 || value === void 0) return false;
6426
+ argv.splice(issueAt, issueSpan);
6427
+ argv.splice(claimAt + 1, 0, value);
6428
+ return true;
6429
+ }
6353
6430
  function classifyParseError(plain) {
6354
6431
  if (/unknown command/i.test(plain)) return "unknown-command";
6355
6432
  if (/unknown option|missing required argument|too many arguments|argument missing|is invalid\. Allowed choices are|cannot be used with/i.test(plain)) {
@@ -19344,10 +19421,10 @@ var rollout_plan_default = {
19344
19421
  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)."
19345
19422
  },
19346
19423
  baseline: {
19347
- version: "4.5.208",
19348
- tag: "v4.5.208",
19349
- commit: "86627b6751ed",
19350
- npm: "@mutmutco/cli@4.5.208"
19424
+ version: "4.5.209",
19425
+ tag: "v4.5.209",
19426
+ commit: "2449709d554c",
19427
+ npm: "@mutmutco/cli@4.5.209"
19351
19428
  },
19352
19429
  exitCriterion: "fleet-n-of-n",
19353
19430
  hubOnlyShortcut: "forbidden",
@@ -19364,14 +19441,14 @@ var rollout_plan_default = {
19364
19441
  repo: "mutmutco/mmi-hub",
19365
19442
  role: "canary",
19366
19443
  schedule: "train",
19367
- v3Target: "v4.5.208"
19444
+ v3Target: "v4.5.209"
19368
19445
  }
19369
19446
  ],
19370
19447
  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.",
19371
19448
  rollback: {
19372
19449
  independent: true,
19373
- mechanism: "npm dist-tag latest -> 4.5.208 and redeploy the Hub Lambda from tag v4.5.208 (86627b6751ed); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
19374
- v3Target: "v4.5.208 (@mutmutco/cli@4.5.208, tag commit 86627b6751ed \u2014 last known-good release carrying the repo-index v4-only contract)"
19450
+ mechanism: "npm dist-tag latest -> 4.5.209 and redeploy the Hub Lambda from tag v4.5.209 (2449709d554c); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
19451
+ v3Target: "v4.5.209 (@mutmutco/cli@4.5.209, tag commit 2449709d554c \u2014 last known-good release carrying the repo-index v4-only contract)"
19375
19452
  }
19376
19453
  },
19377
19454
  {
@@ -58009,6 +58086,7 @@ var STALE_HINT = `(${DISCOVERY_HINT}). If you expected this command to exist, yo
58009
58086
  var lastParseErrorKind = "other";
58010
58087
  var lastUnknownCommand;
58011
58088
  var lastParseErrorConflict = false;
58089
+ var lastParseHintOwnsGuess = false;
58012
58090
  function parseInvalidChoiceError(plain) {
58013
58091
  const m = /option '([^']+)' argument '([^']*)' is invalid\. Allowed choices are ([^.]+)\./.exec(plain);
58014
58092
  if (!m) return void 0;
@@ -58077,6 +58155,12 @@ function resolveParseHint() {
58077
58155
  const parentPath = parent ? canonicalPathFor(commandPath3(parent)) ?? commandPath3(parent) : void 0;
58078
58156
  const guide = unknownCommandDomainGuide(parentPath, lastUnknownCommand);
58079
58157
  if (guide) return `(${guide.hint}. ${DISCOVERY_HINT})`;
58158
+ const claimCmd = resolveCommandFromArgv(program2, ["board", "claim"]);
58159
+ const workboard = claimCmd ? workboardClaimRecovery(lastUnknownCommand, process.argv.slice(2), allCommandPaths(), commandOwnLongFlags(claimCmd)) : void 0;
58160
+ if (workboard) {
58161
+ lastParseHintOwnsGuess = true;
58162
+ return `(${workboard.hint} ${DISCOVERY_HINT})`;
58163
+ }
58080
58164
  const candidates = unknownCommandCandidates(parent, allCommandPaths());
58081
58165
  const tail = unknownCommandTail(process.argv.slice(2), lastUnknownCommand);
58082
58166
  const path3 = lastUnknownCommand ? suggestCommandPath(lastUnknownCommand, candidates, tail) : void 0;
@@ -58135,7 +58219,7 @@ function envelopeAwareWriteErr(str2) {
58135
58219
  return;
58136
58220
  }
58137
58221
  const resolvedHint = resolveParseHint();
58138
- if (lastParseErrorKind === "unknown-command" && (resolvedHint === STALE_HINT || resolvedHint === `(${DISCOVERY_HINT})`)) {
58222
+ if (lastParseErrorKind === "unknown-command" && (lastParseHintOwnsGuess || resolvedHint === STALE_HINT || resolvedHint === `(${DISCOVERY_HINT})`)) {
58139
58223
  pendingHumanParseError = pendingHumanParseError?.replace(/\n\(Did you mean [^)]+\?\)/g, "");
58140
58224
  }
58141
58225
  const hint = str2.replace(PARSE_HINT_SENTINEL, resolvedHint);
@@ -59428,6 +59512,7 @@ function printHouseRootHelp(house) {
59428
59512
  }
59429
59513
  resolveVerbAliasShim(process.argv);
59430
59514
  resolveHouseShim(process.argv);
59515
+ normalizeBoardClaimIssueArgv(process.argv);
59431
59516
  program2.parseAsync(process.argv).then(() => finishCliRun()).catch((e) => failGraceful(e.message));
59432
59517
  // Annotate the CommonJS export names for ESM import in node:
59433
59518
  0 && (module.exports = {
@@ -59438,11 +59523,13 @@ program2.parseAsync(process.argv).then(() => finishCliRun()).catch((e) => failGr
59438
59523
  commandOwnLongFlags,
59439
59524
  envHealLockPath,
59440
59525
  isOrgRegisteredRepo,
59526
+ normalizeBoardClaimIssueArgv,
59441
59527
  parseInvalidChoiceError,
59442
59528
  positionalTargetForm,
59443
59529
  registryClientDeps,
59444
59530
  repoSlug,
59445
59531
  suggestCommandPath,
59446
59532
  unknownCommandCandidates,
59447
- unknownCommandTail
59533
+ unknownCommandTail,
59534
+ workboardClaimRecovery
59448
59535
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.208",
3
+ "version": "4.5.209",
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",