@mutmutco/codex-plugin 4.5.153 → 4.5.154

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.153",
3
+ "version": "4.5.154",
4
4
  "mmiCompat": "4.x",
5
5
  "description": "MMI workflow skills and org gates delivery.",
6
6
  "author": {
package/cli/dist/main.cjs CHANGED
@@ -7163,6 +7163,27 @@ async function readAppVaultSecret(read) {
7163
7163
  }
7164
7164
  }
7165
7165
  async function mintInstallationToken(deps) {
7166
+ return mintScopedInstallationToken(deps, APP_POLL_PERMISSIONS);
7167
+ }
7168
+ async function mintStatusWriteToken(deps) {
7169
+ return mintScopedInstallationToken(deps, { metadata: "read", statuses: "write" });
7170
+ }
7171
+ var statusWriteTokenProvider;
7172
+ function setStatusWriteTokenProvider(provider) {
7173
+ statusWriteTokenProvider = provider;
7174
+ }
7175
+ async function fleetStatusWriteEnv(args) {
7176
+ if (args[0] !== "api" || args[1] !== "-X" || args[2] !== "POST" || !/^repos\/[^/]+\/[^/]+\/statuses\/[^/]+$/.test(args[3] ?? "") || !args.some((arg, i) => arg === "context=fleet-lockstep" && args[i - 1] === "-f")) return void 0;
7177
+ if (!statusWriteTokenProvider) throw new AppActorError("app actor: status-write provider not installed");
7178
+ try {
7179
+ const { token } = await statusWriteTokenProvider();
7180
+ return { ...process.env, GH_TOKEN: token };
7181
+ } catch (e) {
7182
+ if (e instanceof AppActorError && e.code === "vault-denied") return void 0;
7183
+ throw e;
7184
+ }
7185
+ }
7186
+ async function mintScopedInstallationToken(deps, permissions) {
7166
7187
  const [appId, installationId, privateKey] = await Promise.all(APP_VAULT_KEYS.map((k) => deps.fetchSecret(k)));
7167
7188
  if (!appId || !installationId || !privateKey) {
7168
7189
  const missing = APP_VAULT_KEYS.filter((_, i) => ![appId, installationId, privateKey][i]);
@@ -7189,7 +7210,7 @@ async function mintInstallationToken(deps) {
7189
7210
  "content-type": "application/json",
7190
7211
  "user-agent": "mmi-cli-app-actor"
7191
7212
  },
7192
- body: JSON.stringify({ permissions: APP_POLL_PERMISSIONS })
7213
+ body: JSON.stringify({ permissions })
7193
7214
  });
7194
7215
  } catch (e) {
7195
7216
  if (e instanceof AppActorError) throw e;
@@ -18720,10 +18741,10 @@ var rollout_plan_default = {
18720
18741
  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)."
18721
18742
  },
18722
18743
  baseline: {
18723
- version: "4.5.153",
18724
- tag: "v4.5.153",
18725
- commit: "57b23d8d7d5f",
18726
- npm: "@mutmutco/cli@4.5.153"
18744
+ version: "4.5.154",
18745
+ tag: "v4.5.154",
18746
+ commit: "045e47363357",
18747
+ npm: "@mutmutco/cli@4.5.154"
18727
18748
  },
18728
18749
  exitCriterion: "fleet-n-of-n",
18729
18750
  hubOnlyShortcut: "forbidden",
@@ -18740,14 +18761,14 @@ var rollout_plan_default = {
18740
18761
  repo: "mutmutco/mmi-hub",
18741
18762
  role: "canary",
18742
18763
  schedule: "train",
18743
- v3Target: "v4.5.153"
18764
+ v3Target: "v4.5.154"
18744
18765
  }
18745
18766
  ],
18746
18767
  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.",
18747
18768
  rollback: {
18748
18769
  independent: true,
18749
- mechanism: "npm dist-tag latest -> 4.5.153 and redeploy the Hub Lambda from tag v4.5.153 (57b23d8d7d5f); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
18750
- v3Target: "v4.5.153 (@mutmutco/cli@4.5.153, tag commit 57b23d8d7d5f \u2014 last known-good release carrying the repo-index v4-only contract)"
18770
+ mechanism: "npm dist-tag latest -> 4.5.154 and redeploy the Hub Lambda from tag v4.5.154 (045e47363357); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
18771
+ v3Target: "v4.5.154 (@mutmutco/cli@4.5.154, tag commit 045e47363357 \u2014 last known-good release carrying the repo-index v4-only contract)"
18751
18772
  }
18752
18773
  },
18753
18774
  {
@@ -19682,9 +19703,12 @@ async function resolveBoardProjectId(repoOption) {
19682
19703
  return void 0;
19683
19704
  }
19684
19705
  }
19685
- function queryDeps() {
19706
+ function queryDeps(readEnv) {
19686
19707
  return {
19687
- ghJson: async (args, timeoutMs = GH_LIST_TIMEOUT_MS) => JSON.parse((await execFileP("gh", args, { timeout: timeoutMs })).stdout),
19708
+ ghJson: async (args, timeoutMs = GH_LIST_TIMEOUT_MS) => {
19709
+ const env = await readEnv?.();
19710
+ return JSON.parse((await execFileP("gh", args, { timeout: timeoutMs, ...env ? { env } : {} })).stdout);
19711
+ },
19688
19712
  viewer: () => githubLogin(),
19689
19713
  resolveRepo
19690
19714
  };
@@ -20070,7 +20094,8 @@ function defaultFleetTrackInventoryDeps(consistent = false) {
20070
20094
  if (!projects) throw new Error("live Hub registry roster is unavailable \u2014 a committed inventory is never current truth, so there is no fallback; retry when the Hub API is reachable");
20071
20095
  return projects;
20072
20096
  },
20073
- query: queryDeps(),
20097
+ // #8350: gate inventory probes bypass the train runner, so supply its App read env here too.
20098
+ query: queryDeps(ghReadEnv),
20074
20099
  now: () => /* @__PURE__ */ new Date()
20075
20100
  };
20076
20101
  }
@@ -48186,7 +48211,7 @@ function trainApplyDeps() {
48186
48211
  trainWriter: (verb, cwd) => acquireTrainWriterLock(cwd, `mmi-cli devops ${verb}`),
48187
48212
  run: async (file, args) => {
48188
48213
  const timeout = file === "node" && args[1] === "prepare" ? NODE_PREPARE_TIMEOUT_MS : file === "node" && args[1] === "verify" ? NODE_VERIFY_TIMEOUT_MS : file === "npm" && (args[0] === "version" || args[0] === "ci" || args[0] === "install") ? NPM_FOLD_TIMEOUT_MS : file === "npm" ? NPM_TRAIN_TIMEOUT_MS : file === "bash" && /jerv-gateway-release-deploy\.sh$/.test(args[0] ?? "") ? JERV_GATEWAY_DEPLOY_TIMEOUT_MS : file === "git" && args[0] === "commit" ? GIT_COMMIT_TIMEOUT_MS : file !== "gh" ? GIT_TIMEOUT_MS : args[0] === "run" && args[1] === "watch" ? GH_RUN_WATCH_TIMEOUT_MS : GH_TRAIN_TIMEOUT_MS;
48189
- const readEnv = file === "gh" && isAppRoutableGhReadArgs(args) ? await ghReadEnv() : void 0;
48214
+ const readEnv = file !== "gh" ? void 0 : isAppRoutableGhReadArgs(args) ? await ghReadEnv() : await fleetStatusWriteEnv(args);
48190
48215
  try {
48191
48216
  return isWin3 && file === "npm" ? (await execFileP("cmd.exe", ["/c", "npm", ...args], { timeout })).stdout : (await execFileP(file, file === "git" ? trainGitArgs(args) : args, { timeout, ...readEnv ? { env: readEnv } : {} })).stdout;
48192
48217
  } catch (e) {
@@ -56751,6 +56776,7 @@ function appActorDeps() {
56751
56776
  };
56752
56777
  }
56753
56778
  setPollTokenProvider(async () => activeAppToken() ?? pollTokenOrUndefined(appActorDeps()));
56779
+ setStatusWriteTokenProvider(() => mintStatusWriteToken(appActorDeps()));
56754
56780
  var registerPreAction = Reflect.get(program2, ["h", "ook"].join(""));
56755
56781
  registerPreAction.call(program2, "preAction", async (_thisCommand, actionCommand) => {
56756
56782
  const commandPath3 = commandPathOf(actionCommand);
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.5.153",
3
+ "version": "4.5.154",
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.153",
3
+ "version": "4.5.154",
4
4
  "description": "MMI workflow skills and org gates delivery.",
5
5
  "author": {
6
6
  "name": "MMI Future",