@mutmutco/cli 4.6.4 → 4.6.6

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.
@@ -359,10 +359,10 @@ function shouldRetryIntegrationRefusalOnAmbient(err, env = process.env) {
359
359
  if (env.MMI_ACTOR?.trim() === "app") return false;
360
360
  return /Resource not accessible by integration/i.test(String(err?.stderr ?? ""));
361
361
  }
362
- async function ghFilingAppEnv(file, args) {
363
- if (!ghWriteTokenProvider || !/(^|[\\/])gh(\.exe)?$/i.test(file) || process.env.MMI_ACTOR?.trim() === "personal") return void 0;
362
+ async function ghFilingAppEnv(file, args, requireApp = false) {
363
+ if (!ghWriteTokenProvider || !/(^|[\\/])gh(\.exe)?$/i.test(file) || !requireApp && process.env.MMI_ACTOR?.trim() === "personal") return void 0;
364
364
  if (!isAppFilingWrite(args)) return void 0;
365
- const explicitApp = process.env.MMI_ACTOR?.trim() === "app";
365
+ const explicitApp = requireApp || process.env.MMI_ACTOR?.trim() === "app";
366
366
  let token;
367
367
  try {
368
368
  token = await ghWriteTokenProvider();
@@ -455,7 +455,7 @@ var init_cli_shared = __esm({
455
455
  const pool = appEnv ? "app" : !callerEnv ? ambientPool() : !callerEnv.GH_TOKEN ? "personal" : callerEnv.MMI_GH_POOL === "app" ? "app" : callerEnv.GH_TOKEN === process.env.GH_TOKEN ? ambientPool() : "caller";
456
456
  recordGhUsage("gh", pool, args.filter((a) => !a.startsWith("-")).slice(0, 2).join(" "));
457
457
  }
458
- if (!appEnv) return tag(run(), "user");
458
+ if (!appEnv) return tag(run(), options.env?.MMI_GH_POOL === "app" ? "app_installation" : "user");
459
459
  try {
460
460
  return await tag(run(appEnv), "app_installation");
461
461
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/cli",
3
- "version": "4.6.4",
3
+ "version": "4.6.6",
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",