@mutmutco/cli 4.3.40 → 4.3.42
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.
- package/dist/main.cjs +48 -22
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -13692,8 +13692,10 @@ function walk(dir, root, out) {
|
|
|
13692
13692
|
return out;
|
|
13693
13693
|
}
|
|
13694
13694
|
function defaultListDocs(root) {
|
|
13695
|
-
const
|
|
13696
|
-
|
|
13695
|
+
const docs = ["docs", "skills/org-guide", "skills/mmi-help"].flatMap((path2) => {
|
|
13696
|
+
const directory = (0, import_node_path12.join)(root, path2);
|
|
13697
|
+
return (0, import_node_fs14.existsSync)(directory) ? walk(directory, root, []) : [];
|
|
13698
|
+
}).filter(
|
|
13697
13699
|
(rel) => !SKIP_WALK.some((skip) => rel.startsWith(skip))
|
|
13698
13700
|
);
|
|
13699
13701
|
return [...ROOT_DOCS.filter((rel) => (0, import_node_fs14.existsSync)((0, import_node_path12.join)(root, rel))), ...docs];
|
|
@@ -14099,7 +14101,7 @@ function expectedHosts(cfg) {
|
|
|
14099
14101
|
if (cfg.fofuSubdomain !== void 0) {
|
|
14100
14102
|
out.push(cfg.fofuSubdomain ? `${cfg.fofuSubdomain}.fofu.ai` : "fofu.ai");
|
|
14101
14103
|
}
|
|
14102
|
-
return uniq(out);
|
|
14104
|
+
return uniq([...out, ...cfg.edgeHosts ?? []]);
|
|
14103
14105
|
}
|
|
14104
14106
|
function expectedJsOrigins(cfg) {
|
|
14105
14107
|
return uniq([...expectedHosts(cfg).map((h) => `https://${h}`), ...LOOPBACK]);
|
|
@@ -14166,7 +14168,7 @@ function parseOauthConfig(mmiConfig, slug) {
|
|
|
14166
14168
|
const meta = mmiConfig ?? {};
|
|
14167
14169
|
const rawFofuSub = raw.fofuSubdomain;
|
|
14168
14170
|
const fofuSubdomain = meta.fofuEnabled === true ? typeof rawFofuSub === "string" ? rawFofuSub : defaultSubdomain(slug) : void 0;
|
|
14169
|
-
return { subdomains, domains, callbackPath, extraCallbackPaths, fofuSubdomain };
|
|
14171
|
+
return { subdomains, domains, callbackPath, extraCallbackPaths, fofuSubdomain, edgeHosts: Object.values(edgeDomainsByStage(mmiConfig)) };
|
|
14170
14172
|
}
|
|
14171
14173
|
function probeRedirectUri(callbackPath, port = 9123) {
|
|
14172
14174
|
return `http://localhost:${port}${callbackPath}`;
|
|
@@ -14185,6 +14187,20 @@ function buildAuthorizeProbeUrl(clientId, redirectUri) {
|
|
|
14185
14187
|
function authorizeBodyHasMismatch(body) {
|
|
14186
14188
|
return /redirect_uri_mismatch/i.test(body);
|
|
14187
14189
|
}
|
|
14190
|
+
async function probeOauthRedirects(cfg, clientId, request = fetch) {
|
|
14191
|
+
const uris = uniq([probeRedirectUri(cfg.callbackPath), ...expectedRedirectUris(cfg)]);
|
|
14192
|
+
const signal = AbortSignal.timeout(1e4);
|
|
14193
|
+
const results = [];
|
|
14194
|
+
for (let i = 0; i < uris.length; i += 4) {
|
|
14195
|
+
results.push(...await Promise.all(uris.slice(i, i + 4).map(async (redirectUri) => {
|
|
14196
|
+
const response = await request(buildAuthorizeProbeUrl(clientId, redirectUri), { redirect: "follow", signal });
|
|
14197
|
+
const mismatch = authorizeBodyHasMismatch(await response.text());
|
|
14198
|
+
if (!mismatch && !response.ok) throw new Error(`authorize probe returned HTTP ${response.status}`);
|
|
14199
|
+
return { redirectUri, mismatch };
|
|
14200
|
+
})));
|
|
14201
|
+
}
|
|
14202
|
+
return results;
|
|
14203
|
+
}
|
|
14188
14204
|
|
|
14189
14205
|
// src/project-runtime.ts
|
|
14190
14206
|
function hasRuntimeSecretContract(contract) {
|
|
@@ -15694,10 +15710,10 @@ var rollout_plan_default = {
|
|
|
15694
15710
|
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)."
|
|
15695
15711
|
},
|
|
15696
15712
|
baseline: {
|
|
15697
|
-
version: "4.3.
|
|
15698
|
-
tag: "v4.3.
|
|
15699
|
-
commit: "
|
|
15700
|
-
npm: "@mutmutco/cli@4.3.
|
|
15713
|
+
version: "4.3.42",
|
|
15714
|
+
tag: "v4.3.42",
|
|
15715
|
+
commit: "d890700b4096",
|
|
15716
|
+
npm: "@mutmutco/cli@4.3.42"
|
|
15701
15717
|
},
|
|
15702
15718
|
exitCriterion: "fleet-n-of-n",
|
|
15703
15719
|
hubOnlyShortcut: "forbidden",
|
|
@@ -15714,14 +15730,14 @@ var rollout_plan_default = {
|
|
|
15714
15730
|
repo: "mutmutco/mmi-hub",
|
|
15715
15731
|
role: "canary",
|
|
15716
15732
|
schedule: "train",
|
|
15717
|
-
v3Target: "v4.3.
|
|
15733
|
+
v3Target: "v4.3.42"
|
|
15718
15734
|
}
|
|
15719
15735
|
],
|
|
15720
15736
|
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.",
|
|
15721
15737
|
rollback: {
|
|
15722
15738
|
independent: true,
|
|
15723
|
-
mechanism: "npm dist-tag latest -> 4.3.
|
|
15724
|
-
v3Target: "v4.3.
|
|
15739
|
+
mechanism: "npm dist-tag latest -> 4.3.42 and redeploy the Hub Lambda from tag v4.3.42 (d890700b4096); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
15740
|
+
v3Target: "v4.3.42 (@mutmutco/cli@4.3.42, tag commit d890700b4096 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
15725
15741
|
}
|
|
15726
15742
|
},
|
|
15727
15743
|
{
|
|
@@ -31040,7 +31056,16 @@ async function collectOnboardStatus(opts = {}) {
|
|
|
31040
31056
|
readKnown: () => readFileSyncSafe((0, import_node_path28.join)(home, ...KNOWN_MARKETPLACES_RELATIVE), import_node_fs30.readFileSync),
|
|
31041
31057
|
readSettings: () => readFileSyncSafe((0, import_node_path28.join)(home, ".claude", "settings.json"), import_node_fs30.readFileSync)
|
|
31042
31058
|
});
|
|
31043
|
-
return {
|
|
31059
|
+
return {
|
|
31060
|
+
guide: "Read the MMI org-guide skill before project work; load only the relevant topic. Use mmi-help for a short introduction.",
|
|
31061
|
+
track,
|
|
31062
|
+
board,
|
|
31063
|
+
registry: registry2,
|
|
31064
|
+
secrets,
|
|
31065
|
+
plugin,
|
|
31066
|
+
doors: opts.doors ?? [],
|
|
31067
|
+
nextCommand
|
|
31068
|
+
};
|
|
31044
31069
|
}
|
|
31045
31070
|
function registerDiscoveryCommands(program3) {
|
|
31046
31071
|
program3.command("status").description("unified repo snapshot: branch, worktrees, open PRs (yours), claimed board items, stage state").option("--json", "machine-readable output").action(async (o) => {
|
|
@@ -31090,6 +31115,7 @@ function registerDiscoveryCommands(program3) {
|
|
|
31090
31115
|
if (o.json) {
|
|
31091
31116
|
console.log(JSON.stringify(report, null, 2));
|
|
31092
31117
|
} else {
|
|
31118
|
+
console.log(`Guide: ${report.guide}`);
|
|
31093
31119
|
console.log(`Track: ${report.track}`);
|
|
31094
31120
|
console.log(`Board: ${report.board.ok ? "\u2713" : "\u2717"} ${report.board.detail}`);
|
|
31095
31121
|
console.log(`Registry: ${report.registry.ok ? "\u2713" : "\u2717"} ${report.registry.detail}`);
|
|
@@ -42207,7 +42233,7 @@ function registerDeveloperCommands(program3) {
|
|
|
42207
42233
|
await failGraceful(e.message);
|
|
42208
42234
|
}
|
|
42209
42235
|
});
|
|
42210
|
-
docs.command("refs").description("deterministic doc reference gate:
|
|
42236
|
+
docs.command("refs").description("deterministic doc reference gate: repo paths, markdown links, mmi-cli command refs, and pins across docs, org-guide, mmi-help, README and architecture must resolve, or exit 1").option("--json", "machine-readable findings list: { ok, docCount, findings[], warnings[] }").addOption(new Option("--repo <owner/repo>", "not accepted \u2014 docs refs reads the current checkout").hideHelp()).action(async (o) => {
|
|
42211
42237
|
try {
|
|
42212
42238
|
if (o.repo) {
|
|
42213
42239
|
const guard = planTrainApplyRepoGuard(o.repo, await resolveRepo(), `mmi-cli oracle docs refs${o.json ? " --json" : ""}`, "docs refs");
|
|
@@ -45559,22 +45585,22 @@ oauth.command("verify").description("probe Google authorize with an arbitrary po
|
|
|
45559
45585
|
return failGraceful("org oauth verify: no client_id (pass --client-id, or provision the repo so GOOGLE_CLIENT_ID exists)");
|
|
45560
45586
|
}
|
|
45561
45587
|
const redirectUri = probeRedirectUri(oc.callbackPath);
|
|
45562
|
-
let
|
|
45588
|
+
let probes;
|
|
45563
45589
|
try {
|
|
45564
|
-
|
|
45565
|
-
body = await res.text();
|
|
45590
|
+
probes = await probeOauthRedirects(oc, clientId);
|
|
45566
45591
|
} catch (e) {
|
|
45567
45592
|
return failGraceful(`org oauth verify: probe request failed: ${e.message}`);
|
|
45568
45593
|
}
|
|
45569
|
-
const
|
|
45594
|
+
const portAgnostic = !probes[0].mismatch;
|
|
45595
|
+
const mismatches = probes.filter((probe) => probe.mismatch);
|
|
45570
45596
|
if (o.json) {
|
|
45571
|
-
console.log(JSON.stringify({ slug, redirectUri, portAgnostic
|
|
45572
|
-
} else if (
|
|
45573
|
-
console.error(`FAIL ${slug}: redirect_uri_mismatch for ${redirectUri} \u2014
|
|
45597
|
+
console.log(JSON.stringify({ slug, redirectUri, portAgnostic, probes }));
|
|
45598
|
+
} else if (mismatches.length) {
|
|
45599
|
+
for (const probe of mismatches) console.error(`FAIL ${slug}: redirect_uri_mismatch for ${probe.redirectUri} \u2014 run /oauth-provision`);
|
|
45574
45600
|
} else {
|
|
45575
|
-
console.log(`PASS ${slug}: ${
|
|
45601
|
+
console.log(`PASS ${slug}: no redirect_uri_mismatch across ${probes.length} callbacks, including the arbitrary-port loopback`);
|
|
45576
45602
|
}
|
|
45577
|
-
if (
|
|
45603
|
+
if (mismatches.length) process.exitCode = 1;
|
|
45578
45604
|
});
|
|
45579
45605
|
registerCollaborationCommands(program2);
|
|
45580
45606
|
function ciAuditDeps2() {
|
package/package.json
CHANGED