@mutmutco/claude-plugin 4.5.168 → 4.5.170
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/.claude-plugin/plugin.json +1 -1
- package/cli/dist/main.cjs +40 -9
- package/cli/package.json +1 -1
- package/package.json +1 -1
package/cli/dist/main.cjs
CHANGED
|
@@ -10145,6 +10145,19 @@ function retriedFetch(deps, url, init) {
|
|
|
10145
10145
|
sleep: deps.retrySleep
|
|
10146
10146
|
});
|
|
10147
10147
|
}
|
|
10148
|
+
async function backfillDeployHistory(since, apply, deps) {
|
|
10149
|
+
if (!deps.baseUrl) throw new Error("Hub API URL not configured");
|
|
10150
|
+
const token = await deps.token();
|
|
10151
|
+
if (!token) throw new Error("no Hub session token (run `gh auth login`)");
|
|
10152
|
+
const res = await retriedFetch({ ...deps, timeoutMs: TENANT_DEPLOY_TIMEOUT_MS }, `${deps.baseUrl.replace(/\/$/, "")}/deploy-history/backfill`, {
|
|
10153
|
+
method: "POST",
|
|
10154
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
10155
|
+
body: JSON.stringify({ since, dryRun: !apply })
|
|
10156
|
+
});
|
|
10157
|
+
const body = await res.json();
|
|
10158
|
+
if (!res.ok) throw new Error(`deploy history backfill HTTP ${res.status}: ${body.error ?? res.statusText}`);
|
|
10159
|
+
return body;
|
|
10160
|
+
}
|
|
10148
10161
|
async function fetchTrainAuthority(repo, deps) {
|
|
10149
10162
|
if (!deps.baseUrl) return { ok: false, error: "Hub API URL not configured" };
|
|
10150
10163
|
const token = await deps.token();
|
|
@@ -19074,10 +19087,10 @@ var rollout_plan_default = {
|
|
|
19074
19087
|
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)."
|
|
19075
19088
|
},
|
|
19076
19089
|
baseline: {
|
|
19077
|
-
version: "4.5.
|
|
19078
|
-
tag: "v4.5.
|
|
19079
|
-
commit: "
|
|
19080
|
-
npm: "@mutmutco/cli@4.5.
|
|
19090
|
+
version: "4.5.170",
|
|
19091
|
+
tag: "v4.5.170",
|
|
19092
|
+
commit: "db6d0ad102a1",
|
|
19093
|
+
npm: "@mutmutco/cli@4.5.170"
|
|
19081
19094
|
},
|
|
19082
19095
|
exitCriterion: "fleet-n-of-n",
|
|
19083
19096
|
hubOnlyShortcut: "forbidden",
|
|
@@ -19094,14 +19107,14 @@ var rollout_plan_default = {
|
|
|
19094
19107
|
repo: "mutmutco/mmi-hub",
|
|
19095
19108
|
role: "canary",
|
|
19096
19109
|
schedule: "train",
|
|
19097
|
-
v3Target: "v4.5.
|
|
19110
|
+
v3Target: "v4.5.170"
|
|
19098
19111
|
}
|
|
19099
19112
|
],
|
|
19100
19113
|
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.",
|
|
19101
19114
|
rollback: {
|
|
19102
19115
|
independent: true,
|
|
19103
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
19104
|
-
v3Target: "v4.5.
|
|
19116
|
+
mechanism: "npm dist-tag latest -> 4.5.170 and redeploy the Hub Lambda from tag v4.5.170 (db6d0ad102a1); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
19117
|
+
v3Target: "v4.5.170 (@mutmutco/cli@4.5.170, tag commit db6d0ad102a1 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
19105
19118
|
}
|
|
19106
19119
|
},
|
|
19107
19120
|
{
|
|
@@ -23272,7 +23285,11 @@ async function runTenantRedeploy(deps, options) {
|
|
|
23272
23285
|
const ctx = { repo, owner, slug: name.toLowerCase(), login };
|
|
23273
23286
|
const meta = requireProjectMetaForTrain(await loadProjectMeta(deps, ctx), repo);
|
|
23274
23287
|
const deployModel = requireDeployModel(meta, repo);
|
|
23275
|
-
const
|
|
23288
|
+
const singleTrackMain = stage === "main" && meta.releaseTrack === "single";
|
|
23289
|
+
if (singleTrackMain && options.ref === "main") {
|
|
23290
|
+
throw new Error(`${repo} is single-track: its \`main\` branch is stale, so --ref main would roll main back. Pin --ref <last good deployed SHA or development head>, or omit --ref to deploy development.`);
|
|
23291
|
+
}
|
|
23292
|
+
const ref = options.ref ?? (stage === "dev" || singleTrackMain ? "development" : stage);
|
|
23276
23293
|
if (!isCentralDispatchModel(deployModel)) {
|
|
23277
23294
|
throw new Error(`${repo} is ${deployModel}, not a centrally-dispatched model (tenant-container/solo-container/static-cdn) \u2014 there is no central tenant-deploy run to retry (its deploy fires from its own workflow)`);
|
|
23278
23295
|
}
|
|
@@ -31072,6 +31089,7 @@ function consolidateCommandNamespaces(program3) {
|
|
|
31072
31089
|
const runtimeDeploy = runtime.command("deploy").description("runtime deployment status");
|
|
31073
31090
|
const deploy = child(program3, "deploy");
|
|
31074
31091
|
move(deploy, runtimeDeploy, "status");
|
|
31092
|
+
move(deploy, runtimeDeploy, "history-backfill");
|
|
31075
31093
|
remove(program3, "deploy");
|
|
31076
31094
|
move(program3, runtime, "box");
|
|
31077
31095
|
move(program3, runtime, "edge");
|
|
@@ -37879,6 +37897,19 @@ function formatDeployStatus(r) {
|
|
|
37879
37897
|
var STAGES2 = ["dev", "rc", "main"];
|
|
37880
37898
|
function registerDeployCommands(program3) {
|
|
37881
37899
|
const deploy = program3.command("deploy").description("per-stage deploy observability \u2014 last run, health, and running version (#2688)");
|
|
37900
|
+
deploy.command("history-backfill").description("master-only registry history backfill from Hub tenant-deploy runs (dry-run by default; no dispatch)").requiredOption("--since <ISO>", "include runs created at or after this timestamp").option("--apply", "write successful runs to Hub deploy history").option("--json", "machine-readable counts").action(async (o) => {
|
|
37901
|
+
try {
|
|
37902
|
+
const report = await backfillDeployHistory(o.since, o.apply === true, registryClientDeps(await loadConfig()));
|
|
37903
|
+
if (o.json) console.log(JSON.stringify(report, null, 2));
|
|
37904
|
+
else {
|
|
37905
|
+
console.log(`${report.dryRun ? "Dry-run" : "Applied"} since ${report.since}: ${report.totalRuns} runs, ${report.written} written`);
|
|
37906
|
+
for (const [repo, counts] of Object.entries(report.perRepo)) console.log(`${repo}: ${counts.success} success, ${counts.failed} failed, ${counts.cancelled} cancelled, ${counts.other} other`);
|
|
37907
|
+
console.log(`Skipped: ${report.skipped.nonSha} non-SHA, ${report.skipped.unregistered} unregistered/ambiguous, ${report.skipped.badTitle} bad title`);
|
|
37908
|
+
}
|
|
37909
|
+
} catch (e) {
|
|
37910
|
+
return failGraceful(`deploy history-backfill: ${e.message}`);
|
|
37911
|
+
}
|
|
37912
|
+
});
|
|
37882
37913
|
deploy.command("status <stage>").description("last deploy run + runtime health probe + running version for a stage (defaults to the current repo); a root answering 401/403/404 is re-probed at /health and the `url` field names the endpoint that answered (#6137)").option("--repo <owner/repo>", "target repo (defaults to the current repo)").option("--json", "machine-readable output").action(async (stage, o) => {
|
|
37883
37914
|
if (!STAGES2.includes(stage)) {
|
|
37884
37915
|
return fail(`runtime deploy status: <stage> must be dev, rc, or main`);
|
|
@@ -57405,7 +57436,7 @@ tenant.command("status <owner/repo> <stage>").description("read tenant runtime r
|
|
|
57405
57436
|
console.log(JSON.stringify(result, null, 2));
|
|
57406
57437
|
if (result.publicProbe?.ok === false || result.edgeCertificate?.missing) process.exitCode = 1;
|
|
57407
57438
|
});
|
|
57408
|
-
tenant.command("redeploy <owner/repo> <stage>").description("re-dispatch the central tenant-deploy.yml for an already-promoted ref (no re-tag/merge); train-authority gated").option("--ref <ref>", "ref to deploy (defaults to the stage branch rc/main, or `development` for dev and for a single-track repo's main)").option("--watch", "block on the dispatched run and report its outcome (gh run watch --exit-status)").option("--json", "machine-readable output").action(async (repo, stage, o) => {
|
|
57439
|
+
tenant.command("redeploy <owner/repo> <stage>").description("re-dispatch the central tenant-deploy.yml for an already-promoted ref (no re-tag/merge); train-authority gated").option("--ref <ref>", "ref to deploy (defaults to the stage branch rc/main, or `development` for dev and for a single-track repo's main, where --ref main is refused)").option("--watch", "block on the dispatched run and report its outcome (gh run watch --exit-status)").option("--json", "machine-readable output").action(async (repo, stage, o) => {
|
|
57409
57440
|
if (stage !== "dev" && stage !== "rc" && stage !== "main") return fail("runtime tenant redeploy: <stage> must be dev, rc, or main");
|
|
57410
57441
|
try {
|
|
57411
57442
|
const raw = await runTenantRedeploy(trainApplyDeps(), { repo, stage, ref: o.ref, watch: o.watch });
|
package/cli/package.json
CHANGED