@mutmutco/cli 4.5.81 → 4.5.82

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 -7
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -17249,10 +17249,10 @@ var rollout_plan_default = {
17249
17249
  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)."
17250
17250
  },
17251
17251
  baseline: {
17252
- version: "4.5.81",
17253
- tag: "v4.5.81",
17254
- commit: "0c3a49536686",
17255
- npm: "@mutmutco/cli@4.5.81"
17252
+ version: "4.5.82",
17253
+ tag: "v4.5.82",
17254
+ commit: "d9d21d149b66",
17255
+ npm: "@mutmutco/cli@4.5.82"
17256
17256
  },
17257
17257
  exitCriterion: "fleet-n-of-n",
17258
17258
  hubOnlyShortcut: "forbidden",
@@ -17269,14 +17269,14 @@ var rollout_plan_default = {
17269
17269
  repo: "mutmutco/mmi-hub",
17270
17270
  role: "canary",
17271
17271
  schedule: "train",
17272
- v3Target: "v4.5.81"
17272
+ v3Target: "v4.5.82"
17273
17273
  }
17274
17274
  ],
17275
17275
  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.",
17276
17276
  rollback: {
17277
17277
  independent: true,
17278
- mechanism: "npm dist-tag latest -> 4.5.81 and redeploy the Hub Lambda from tag v4.5.81 (0c3a49536686); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
17279
- v3Target: "v4.5.81 (@mutmutco/cli@4.5.81, tag commit 0c3a49536686 \u2014 last known-good release carrying the repo-index v4-only contract)"
17278
+ mechanism: "npm dist-tag latest -> 4.5.82 and redeploy the Hub Lambda from tag v4.5.82 (d9d21d149b66); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
17279
+ v3Target: "v4.5.82 (@mutmutco/cli@4.5.82, tag commit d9d21d149b66 \u2014 last known-good release carrying the repo-index v4-only contract)"
17280
17280
  }
17281
17281
  },
17282
17282
  {
@@ -21627,7 +21627,51 @@ async function dispatchCanary(deps, targetRepo2, nonce) {
21627
21627
  attempts.every((a) => isCanaryAccessBlockText(a)) ? `${detail} Every door answered with an access refusal \u2014 the caller may read MMI-Hub but not start its workflows.` : detail
21628
21628
  );
21629
21629
  }
21630
+ var HOSTED_LABEL_RE = /\b(?:ubuntu|windows|macos)-(?:latest|\d[\w.-]*)\b/;
21631
+ var AUTOMATIC_TRIGGERS = /* @__PURE__ */ new Set(["push", "pull_request", "pull_request_target", "release", "schedule", "workflow_run", "merge_group", "create", "deployment", "repository_dispatch", "check_run", "check_suite", "issues", "issue_comment"]);
21632
+ function workflowTriggers(yaml) {
21633
+ const lines2 = yaml.split(/\r?\n/);
21634
+ const i = lines2.findIndex((l) => /^(?:on|"on"|'on'):(?:\s|$)/.test(l));
21635
+ if (i < 0) return [];
21636
+ const inline = lines2[i].replace(/^[^:]+:\s*/, "").replace(/\s+#.*$/, "").trim();
21637
+ if (inline) return inline.replace(/^\[|\]$/g, "").split(",").map((s) => s.trim().replace(/^['"]|['"]$/g, "")).filter(Boolean);
21638
+ const out = [];
21639
+ for (const line of lines2.slice(i + 1)) {
21640
+ if (/^\S/.test(line)) break;
21641
+ const m = /^ {2}([A-Za-z_]+):/.exec(line) ?? /^ {2}- ([A-Za-z_]+)\s*$/.exec(line);
21642
+ if (m) out.push(m[1]);
21643
+ }
21644
+ return out;
21645
+ }
21646
+ function workflowNeedsHostedRunner(yaml) {
21647
+ const body = yaml.split(/\r?\n/).filter((l) => !/^\s*#/.test(l)).join("\n");
21648
+ return HOSTED_LABEL_RE.test(body) && workflowTriggers(yaml).some((t) => AUTOMATIC_TRIGGERS.has(t));
21649
+ }
21650
+ async function hostedWorkflowsOf(deps, repo) {
21651
+ const list = parseJson(
21652
+ await deps.run("gh", ["api", `repos/${repo}/contents/.github/workflows`]),
21653
+ `${repo} workflow listing`
21654
+ );
21655
+ const hosted = [];
21656
+ for (const f of list) {
21657
+ if (f.type !== "file" || !f.path || !/\.ya?ml$/.test(f.path) || f.name === CANARY_WORKFLOW) continue;
21658
+ const raw = parseJson(await deps.run("gh", ["api", `repos/${repo}/contents/${f.path}`]), `${repo} ${f.path}`);
21659
+ if (workflowNeedsHostedRunner(Buffer.from(raw.content ?? "", "base64").toString("utf8"))) hosted.push(f.path);
21660
+ }
21661
+ return hosted;
21662
+ }
21630
21663
  async function assertActionsJobsCanStart(deps, targetRepo2) {
21664
+ let hosted;
21665
+ try {
21666
+ hosted = await hostedWorkflowsOf(deps, targetRepo2);
21667
+ } catch {
21668
+ hosted = void 0;
21669
+ }
21670
+ if (hosted && hosted.length === 0) {
21671
+ process.stderr.write(`actions preflight: ${targetRepo2} has no automatically triggered GitHub-hosted job; hosted canary skipped (#7721)
21672
+ `);
21673
+ return;
21674
+ }
21631
21675
  const scanned = await scanRepoForBillingBlock(deps, targetRepo2);
21632
21676
  if (scanned) throw actionsBillingRefusal(scanned);
21633
21677
  if (targetRepo2.toLowerCase() !== CANARY_REPO.toLowerCase()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.81",
3
+ "version": "4.5.82",
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",