@mutmutco/codex-plugin 4.5.106 → 4.5.108

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmi",
3
- "version": "4.5.106",
3
+ "version": "4.5.108",
4
4
  "mmiCompat": "4.x",
5
5
  "description": "MMI workflow skills and org gates delivery.",
6
6
  "author": {
package/cli/dist/main.cjs CHANGED
@@ -384,6 +384,8 @@ function classifyGhTokenExecFailure(e) {
384
384
  return { state: "failed", detail };
385
385
  }
386
386
  async function githubTokenRead() {
387
+ const mmiPat = process.env.MMI_GH_PAT?.trim();
388
+ if (mmiPat) return { state: "ok", token: mmiPat };
387
389
  if (process.env.GH_TOKEN) return { state: "ok", token: process.env.GH_TOKEN };
388
390
  if (process.env.GITHUB_TOKEN) return { state: "ok", token: process.env.GITHUB_TOKEN };
389
391
  cachedGhCliTokenRead ??= execFileP("gh", ["auth", "token"]).then(({ stdout }) => {
@@ -5757,7 +5759,9 @@ var APP_POLL_PERMISSIONS = {
5757
5759
  issues: "read",
5758
5760
  checks: "read",
5759
5761
  statuses: "read",
5760
- actions: "read"
5762
+ actions: "read",
5763
+ // #7978: GET branches/{b}/protection/required_status_checks needs Administration: read; read-only.
5764
+ administration: "read"
5761
5765
  };
5762
5766
  var APP_JWT_BACKDATE_S = 60;
5763
5767
  var APP_JWT_TTL_S = 9 * 60;
@@ -6413,6 +6417,18 @@ async function defaultGhApi(args) {
6413
6417
  lastPollSource = source;
6414
6418
  return cached.body;
6415
6419
  }
6420
+ if (source === "app" && appToken && status === 403 && /Resource not accessible by integration/i.test(describeRefusal(errOut))) {
6421
+ console.warn(`poll credential: App token lacks permission for this read (HTTP 403, response: ${describeRefusal(errOut)}) \u2014 this read uses the ambient user token; the App pool stays in use (#7978)`);
6422
+ try {
6423
+ const { stdout: userOut } = await execFileP("gh", ["api", "--include", ...args], { timeout: REST_GH_TIMEOUT_MS });
6424
+ notePoolHeaders("user", userOut, Date.now());
6425
+ return parseIncludedOutput(userOut).body;
6426
+ } catch (userErr) {
6427
+ const uo = userErr.stdout;
6428
+ if (typeof uo === "string") notePoolHeaders("user", uo, Date.now());
6429
+ throw userErr;
6430
+ }
6431
+ }
6416
6432
  if (source === "app" && appToken && (status === 403 || status === 429)) {
6417
6433
  noteAppPollResponse(parseRateLimitHeaders(errOut), true, Date.now());
6418
6434
  console.warn(`poll credential: App pool refused the read (HTTP ${status}, ${appPoolDetail()}; response: ${describeRefusal(errOut)}) \u2014 REST poll reads switch to the ambient user token until the App pool resets (#7843)`);
@@ -13392,6 +13408,7 @@ function asBoardStatus(value) {
13392
13408
  return BOARD_STATUSES.includes(value) ? value : void 0;
13393
13409
  }
13394
13410
  function describeTokenSource() {
13411
+ if (process.env.MMI_GH_PAT?.trim()) return "env MMI_GH_PAT";
13395
13412
  if (process.env.GH_TOKEN) return "env GH_TOKEN";
13396
13413
  if (process.env.GITHUB_TOKEN) return "env GITHUB_TOKEN";
13397
13414
  return "`gh auth token` (the gh CLI login)";
@@ -17699,10 +17716,10 @@ var rollout_plan_default = {
17699
17716
  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)."
17700
17717
  },
17701
17718
  baseline: {
17702
- version: "4.5.106",
17703
- tag: "v4.5.106",
17704
- commit: "0bc277b6a60e",
17705
- npm: "@mutmutco/cli@4.5.106"
17719
+ version: "4.5.108",
17720
+ tag: "v4.5.108",
17721
+ commit: "35c9217e8f1c",
17722
+ npm: "@mutmutco/cli@4.5.108"
17706
17723
  },
17707
17724
  exitCriterion: "fleet-n-of-n",
17708
17725
  hubOnlyShortcut: "forbidden",
@@ -17719,14 +17736,14 @@ var rollout_plan_default = {
17719
17736
  repo: "mutmutco/mmi-hub",
17720
17737
  role: "canary",
17721
17738
  schedule: "train",
17722
- v3Target: "v4.5.106"
17739
+ v3Target: "v4.5.108"
17723
17740
  }
17724
17741
  ],
17725
17742
  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.",
17726
17743
  rollback: {
17727
17744
  independent: true,
17728
- mechanism: "npm dist-tag latest -> 4.5.106 and redeploy the Hub Lambda from tag v4.5.106 (0bc277b6a60e); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
17729
- v3Target: "v4.5.106 (@mutmutco/cli@4.5.106, tag commit 0bc277b6a60e \u2014 last known-good release carrying the repo-index v4-only contract)"
17745
+ mechanism: "npm dist-tag latest -> 4.5.108 and redeploy the Hub Lambda from tag v4.5.108 (35c9217e8f1c); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
17746
+ v3Target: "v4.5.108 (@mutmutco/cli@4.5.108, tag commit 35c9217e8f1c \u2014 last known-good release carrying the repo-index v4-only contract)"
17730
17747
  }
17731
17748
  },
17732
17749
  {
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.106",
3
+ "version": "4.5.108",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/codex-plugin",
3
- "version": "4.5.106",
3
+ "version": "4.5.108",
4
4
  "description": "MMI workflow skills and org gates delivery.",
5
5
  "author": {
6
6
  "name": "MMI Future",
@@ -50,7 +50,7 @@ BuildKit ids into the **`docker compose build`** process env only — not into t
50
50
  deploy mints the packages sentinel from Actions `GITHUB_TOKEN`; a laptop cannot. Resolution order: existing
51
51
  process env → stageless project vault secret under the BuildKit id → existing GitHub sign-in
52
52
  (`GH_TOKEN`, `GITHUB_TOKEN`, or `gh auth token`). Package read access is still required and is enforced
53
- by GitHub Packages during the build. If every source is missing, `/stage` fails before the build.
53
+ by GitHub Packages during the build. Cloud containers whose GH_TOKEN is a proxy placeholder set MMI_GH_PAT to a fine-grained PAT (resource owner mutmutco, Organization → Members: read); mmi-cli prefers it. If every source is missing, `/stage` fails before the build.
54
54
  Setup: [`docs/Guides/tenant-runtime.md`](../../docs/Guides/tenant-runtime.md) § Local `/stage`. Never commit
55
55
  or print the PAT.
56
56