@mutmutco/cli 4.3.6 → 4.3.7
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 +42 -64
- package/package.json +2 -4
package/dist/main.cjs
CHANGED
|
@@ -9347,8 +9347,6 @@ function normalizeTitle(title) {
|
|
|
9347
9347
|
return title.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim();
|
|
9348
9348
|
}
|
|
9349
9349
|
var REPORT_TIMEOUT_MS = 8e3;
|
|
9350
|
-
var RED_TEAM_SLA_DAYS = 14;
|
|
9351
|
-
var RED_TEAM_SLA_MS = RED_TEAM_SLA_DAYS * 24 * 60 * 60 * 1e3;
|
|
9352
9350
|
async function fileReport(deps, req) {
|
|
9353
9351
|
const res = await deps.fetch(`${deps.apiUrl}/reports`, {
|
|
9354
9352
|
method: "POST",
|
|
@@ -14321,6 +14319,12 @@ function trainFollowUpNote(status) {
|
|
|
14321
14319
|
return `follow-up ${status}: the exit code is never the verdict, read workflowRuns \u2014 see docs/Guides/train-troubleshooting.md#follow-up-pending`;
|
|
14322
14320
|
}
|
|
14323
14321
|
var TRAIN_DEPLOY_FAILED_NOTE = "promotion stands; retry the deploy, do not re-tag \u2014 see docs/Guides/train-troubleshooting.md#deploy-failed";
|
|
14322
|
+
function missingRunUrlNote(runId) {
|
|
14323
|
+
return runId != null ? `no run URL emitted \u2014 GitHub Actions returned run ${runId} without its URL` : "no run URL emitted \u2014 run absent or unreadable";
|
|
14324
|
+
}
|
|
14325
|
+
function workflowRunWithEvidence(run) {
|
|
14326
|
+
return run.runUrl || run.runUrlNote ? run : { ...run, runUrlNote: missingRunUrlNote(run.runId) };
|
|
14327
|
+
}
|
|
14324
14328
|
function isCentralDispatchModel(model) {
|
|
14325
14329
|
return model === "tenant-container" || model === "solo-container" || model === "static-cdn";
|
|
14326
14330
|
}
|
|
@@ -15399,10 +15403,10 @@ var rollout_plan_default = {
|
|
|
15399
15403
|
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)."
|
|
15400
15404
|
},
|
|
15401
15405
|
baseline: {
|
|
15402
|
-
version: "4.3.
|
|
15403
|
-
tag: "v4.3.
|
|
15404
|
-
commit: "
|
|
15405
|
-
npm: "@mutmutco/cli@4.3.
|
|
15406
|
+
version: "4.3.7",
|
|
15407
|
+
tag: "v4.3.7",
|
|
15408
|
+
commit: "d7f9efaf3e66",
|
|
15409
|
+
npm: "@mutmutco/cli@4.3.7"
|
|
15406
15410
|
},
|
|
15407
15411
|
exitCriterion: "fleet-n-of-n",
|
|
15408
15412
|
hubOnlyShortcut: "forbidden",
|
|
@@ -15419,14 +15423,14 @@ var rollout_plan_default = {
|
|
|
15419
15423
|
repo: "mutmutco/mmi-hub",
|
|
15420
15424
|
role: "canary",
|
|
15421
15425
|
schedule: "train",
|
|
15422
|
-
v3Target: "v4.3.
|
|
15426
|
+
v3Target: "v4.3.7"
|
|
15423
15427
|
}
|
|
15424
15428
|
],
|
|
15425
15429
|
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.",
|
|
15426
15430
|
rollback: {
|
|
15427
15431
|
independent: true,
|
|
15428
|
-
mechanism: "npm dist-tag latest -> 4.3.
|
|
15429
|
-
v3Target: "v4.3.
|
|
15432
|
+
mechanism: "npm dist-tag latest -> 4.3.7 and redeploy the Hub Lambda from tag v4.3.7 (d7f9efaf3e66); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
15433
|
+
v3Target: "v4.3.7 (@mutmutco/cli@4.3.7, tag commit d7f9efaf3e66 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
15430
15434
|
}
|
|
15431
15435
|
},
|
|
15432
15436
|
{
|
|
@@ -18276,6 +18280,7 @@ function appendPublishDispatch(deploy, publish) {
|
|
|
18276
18280
|
deployStatus: deploy.deployStatus === "failure" || publish.deployStatus === "failure" ? "failure" : deploy.deployStatus === "pending" || publish.deployStatus === "pending" ? "pending" : "success"
|
|
18277
18281
|
};
|
|
18278
18282
|
}
|
|
18283
|
+
var JERV_GATEWAY_RUN_URL_NOTE = "no run URL emitted \u2014 host health leg runs outside GitHub Actions";
|
|
18279
18284
|
async function appendJervGatewayReleaseDeploy(deps, repo, tag, tagSha, dispatch) {
|
|
18280
18285
|
if (!isJervHubRepo(repo)) return dispatch;
|
|
18281
18286
|
if (dispatch.deployStatus !== "success") {
|
|
@@ -18299,7 +18304,7 @@ async function appendJervGatewayReleaseDeploy(deps, repo, tag, tagSha, dispatch)
|
|
|
18299
18304
|
return {
|
|
18300
18305
|
...dispatch,
|
|
18301
18306
|
note: `${dispatch.note}; Jerv Gateway deployed ${tagSha.slice(0, 12)} and passed health checks`,
|
|
18302
|
-
workflowRuns: [...dispatch.workflowRuns ?? [], { workflow: "jerv-gateway", conclusion: "success" }],
|
|
18307
|
+
workflowRuns: [...dispatch.workflowRuns ?? [], { workflow: "jerv-gateway", runUrlNote: JERV_GATEWAY_RUN_URL_NOTE, conclusion: "success" }],
|
|
18303
18308
|
deployStatus: "success"
|
|
18304
18309
|
};
|
|
18305
18310
|
} catch (error) {
|
|
@@ -18308,7 +18313,7 @@ async function appendJervGatewayReleaseDeploy(deps, repo, tag, tagSha, dispatch)
|
|
|
18308
18313
|
...dispatch,
|
|
18309
18314
|
// #6095: the helper's receipt, health or rollback failed after a proven publish — the release resumes, never re-tags.
|
|
18310
18315
|
note: `${dispatch.note}; Jerv Gateway deploy FAILED (${detail}) \u2014 see docs/Guides/train-troubleshooting.md#jerv-gateway-deploy`,
|
|
18311
|
-
workflowRuns: [...dispatch.workflowRuns ?? [], { workflow: "jerv-gateway", conclusion: "failure" }],
|
|
18316
|
+
workflowRuns: [...dispatch.workflowRuns ?? [], { workflow: "jerv-gateway", runUrlNote: JERV_GATEWAY_RUN_URL_NOTE, conclusion: "failure" }],
|
|
18312
18317
|
deployStatus: "failure"
|
|
18313
18318
|
};
|
|
18314
18319
|
}
|
|
@@ -30230,14 +30235,6 @@ var surfaces_default = {
|
|
|
30230
30235
|
sourcePath: "skills",
|
|
30231
30236
|
targetPath: "packages/claude-plugin/skills"
|
|
30232
30237
|
},
|
|
30233
|
-
{
|
|
30234
|
-
mode: "files",
|
|
30235
|
-
sourcePath: "scripts",
|
|
30236
|
-
targetPath: "packages/claude-plugin/scripts",
|
|
30237
|
-
include: [
|
|
30238
|
-
"edit-tool-paths.mjs"
|
|
30239
|
-
]
|
|
30240
|
-
},
|
|
30241
30238
|
{
|
|
30242
30239
|
mode: "files",
|
|
30243
30240
|
sourcePath: "bin",
|
|
@@ -30313,14 +30310,6 @@ var surfaces_default = {
|
|
|
30313
30310
|
sourcePath: "skills",
|
|
30314
30311
|
targetPath: "packages/codex-plugin/skills"
|
|
30315
30312
|
},
|
|
30316
|
-
{
|
|
30317
|
-
mode: "files",
|
|
30318
|
-
sourcePath: "scripts",
|
|
30319
|
-
targetPath: "packages/codex-plugin/scripts",
|
|
30320
|
-
include: [
|
|
30321
|
-
"edit-tool-paths.mjs"
|
|
30322
|
-
]
|
|
30323
|
-
},
|
|
30324
30313
|
{
|
|
30325
30314
|
mode: "files",
|
|
30326
30315
|
sourcePath: "bin",
|
|
@@ -30396,14 +30385,6 @@ var surfaces_default = {
|
|
|
30396
30385
|
sourcePath: "skills",
|
|
30397
30386
|
targetPath: "packages/cursor-plugin/skills"
|
|
30398
30387
|
},
|
|
30399
|
-
{
|
|
30400
|
-
mode: "files",
|
|
30401
|
-
sourcePath: "scripts",
|
|
30402
|
-
targetPath: "packages/cursor-plugin/scripts",
|
|
30403
|
-
include: [
|
|
30404
|
-
"edit-tool-paths.mjs"
|
|
30405
|
-
]
|
|
30406
|
-
},
|
|
30407
30388
|
{
|
|
30408
30389
|
mode: "files",
|
|
30409
30390
|
sourcePath: "bin",
|
|
@@ -30482,14 +30463,6 @@ var surfaces_default = {
|
|
|
30482
30463
|
excludeNamePrefixes: [
|
|
30483
30464
|
"_"
|
|
30484
30465
|
]
|
|
30485
|
-
},
|
|
30486
|
-
{
|
|
30487
|
-
mode: "files",
|
|
30488
|
-
sourcePath: "scripts",
|
|
30489
|
-
targetPath: ".pi-plugin/scripts",
|
|
30490
|
-
include: [
|
|
30491
|
-
"edit-tool-paths.mjs"
|
|
30492
|
-
]
|
|
30493
30466
|
}
|
|
30494
30467
|
]
|
|
30495
30468
|
},
|
|
@@ -30549,14 +30522,6 @@ var surfaces_default = {
|
|
|
30549
30522
|
mode: "directories",
|
|
30550
30523
|
sourcePath: "skills",
|
|
30551
30524
|
targetPath: "packages/hermes-plugin/skills"
|
|
30552
|
-
},
|
|
30553
|
-
{
|
|
30554
|
-
mode: "files",
|
|
30555
|
-
sourcePath: "scripts",
|
|
30556
|
-
targetPath: "packages/hermes-plugin/scripts",
|
|
30557
|
-
include: [
|
|
30558
|
-
"edit-tool-paths.mjs"
|
|
30559
|
-
]
|
|
30560
30525
|
}
|
|
30561
30526
|
]
|
|
30562
30527
|
},
|
|
@@ -37845,9 +37810,9 @@ function isPathAtOrWithin(path2, worktreePath) {
|
|
|
37845
37810
|
function isWindowsCwdLockResidueError(error) {
|
|
37846
37811
|
return process.platform === "win32" && /\bEPERM\b|access(?: is)? denied/i.test(error);
|
|
37847
37812
|
}
|
|
37848
|
-
function deferredCwdLockRemediation(
|
|
37813
|
+
function deferredCwdLockRemediation(wtPath) {
|
|
37849
37814
|
const quote = (path2) => path2.replace(/'/g, "''");
|
|
37850
|
-
return `After this command exits:
|
|
37815
|
+
return `After this command exits: jervcode worktree-cleanup --worktree '${quote(wtPath)}'`;
|
|
37851
37816
|
}
|
|
37852
37817
|
function primaryCheckoutBranchRemediation(primaryRoot, baseRef, branch) {
|
|
37853
37818
|
const quote = (value) => value.replace(/'/g, "''");
|
|
@@ -38253,7 +38218,7 @@ async function cleanupPrMergeLocalBranch(branch, options) {
|
|
|
38253
38218
|
if (isWindowsCwdLockResidueError(residue.error) && isPathAtOrWithin(options.startingPath, wtPath)) {
|
|
38254
38219
|
report.worktree.status = "retained-locked";
|
|
38255
38220
|
report.worktree.reason = "parent-cwd-lock";
|
|
38256
|
-
report.worktree.remediation = deferredCwdLockRemediation(
|
|
38221
|
+
report.worktree.remediation = deferredCwdLockRemediation(wtPath);
|
|
38257
38222
|
} else {
|
|
38258
38223
|
report.worktree.status = "failed";
|
|
38259
38224
|
report.worktree.reason = "residue-remains";
|
|
@@ -40615,7 +40580,7 @@ function registerDeveloperCommands(program3) {
|
|
|
40615
40580
|
await failGraceful(e.message);
|
|
40616
40581
|
}
|
|
40617
40582
|
});
|
|
40618
|
-
docs.command("refs").description("deterministic doc reference gate: every backticked repo path, relative .md link, `mmi-cli` command ref, and `<!-- pinned by \u2014 -->` comment across docs/** + README.md + architecture.md must resolve, or exit 1 (
|
|
40583
|
+
docs.command("refs").description("deterministic doc reference gate: every backticked repo path, relative .md link, `mmi-cli` command ref, and `<!-- pinned by \u2014 -->` comment across docs/** + README.md + architecture.md must resolve, or exit 1 (#3339)").option("--json", "machine-readable findings list: { ok, docCount, findings[], warnings[] }").action(async (o) => {
|
|
40619
40584
|
try {
|
|
40620
40585
|
const root = await repoRoot();
|
|
40621
40586
|
const commandPaths = new Set(
|
|
@@ -42243,8 +42208,8 @@ function trainApplyDeps() {
|
|
|
42243
42208
|
};
|
|
42244
42209
|
}
|
|
42245
42210
|
function formatWorkflowRun(r) {
|
|
42246
|
-
const
|
|
42247
|
-
return `${
|
|
42211
|
+
const evidenced = workflowRunWithEvidence(r);
|
|
42212
|
+
return `${evidenced.workflow} ${evidenced.runUrl ?? evidenced.runUrlNote} ${evidenced.conclusion.toUpperCase()}`;
|
|
42248
42213
|
}
|
|
42249
42214
|
function renderDeployLine(d) {
|
|
42250
42215
|
const parts = [d.dispatch];
|
|
@@ -42517,7 +42482,8 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42517
42482
|
if (o.apply) return fail(`${commandName}: --resume and --apply are mutually exclusive \u2014 --apply cuts the NEXT version, --resume finishes the immutable tag already on origin`);
|
|
42518
42483
|
try {
|
|
42519
42484
|
if (commandName === "rcand") {
|
|
42520
|
-
const
|
|
42485
|
+
const raw2 = await runRcandResume(trainApplyDeps(), { watch: o.watch });
|
|
42486
|
+
const result2 = raw2.workflowRuns ? { ...raw2, workflowRuns: raw2.workflowRuns.map(workflowRunWithEvidence) } : raw2;
|
|
42521
42487
|
emitTrainResult("rcand --resume", o.json ? JSON.stringify(result2, null, 2) : renderRcandResume(result2), o.out);
|
|
42522
42488
|
applyTrainFollowUpExit(deriveTrainFollowUpStatus({
|
|
42523
42489
|
projectInfo: "ok",
|
|
@@ -42528,7 +42494,8 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42528
42494
|
}));
|
|
42529
42495
|
return;
|
|
42530
42496
|
}
|
|
42531
|
-
const
|
|
42497
|
+
const raw = await runReleaseResume(trainApplyDeps(), { watch: o.watch, announceSummaryFile: o.announceSummaryFile });
|
|
42498
|
+
const result = raw.dispatch?.workflowRuns ? { ...raw, dispatch: { ...raw.dispatch, workflowRuns: raw.dispatch.workflowRuns.map(workflowRunWithEvidence) } } : raw;
|
|
42532
42499
|
emitTrainResult("release --resume", o.json ? JSON.stringify(result, null, 2) : renderReleaseResume(result), o.out);
|
|
42533
42500
|
applyTrainFollowUpExit(resumeFollowUpOf(result.state));
|
|
42534
42501
|
return;
|
|
@@ -42563,7 +42530,8 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42563
42530
|
if (o.apply) {
|
|
42564
42531
|
try {
|
|
42565
42532
|
const ack = (o.ack ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
42566
|
-
const
|
|
42533
|
+
const raw = await runTrainApply(commandName, trainApplyDeps(), { watch: o.watch, announceSummaryFile: o.announceSummaryFile, ack, dev: o.dev });
|
|
42534
|
+
const result = raw.workflowRuns ? { ...raw, workflowRuns: raw.workflowRuns.map(workflowRunWithEvidence) } : raw;
|
|
42567
42535
|
let projectInfoSync;
|
|
42568
42536
|
const postReleaseJervDoctor = commandName === "release" ? await runPostReleaseJervDoctor(result.repo) : void 0;
|
|
42569
42537
|
if (commandName === "release") {
|
|
@@ -42625,6 +42593,13 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42625
42593
|
function renderHotfixStart(r) {
|
|
42626
42594
|
return [`mmi-cli devops hotfix start: ${r.tag} (${r.branch}, from ${r.source})${r.reused ? " [reused]" : ""}`, ...r.notes.map((n) => ` - ${n}`)].join("\n");
|
|
42627
42595
|
}
|
|
42596
|
+
function hotfixRunWithEvidence(run) {
|
|
42597
|
+
return run.url || run.runUrlNote ? run : { ...run, runUrlNote: missingRunUrlNote(run.runId) };
|
|
42598
|
+
}
|
|
42599
|
+
function formatHotfixRun(run) {
|
|
42600
|
+
const evidenced = hotfixRunWithEvidence(run);
|
|
42601
|
+
return ` - ${evidenced.workflow}: ${evidenced.conclusion}${evidenced.conclusion === "failure" ? " \u2014 error: workflow reported failure" : ""} (${evidenced.url ?? evidenced.runUrlNote})`;
|
|
42602
|
+
}
|
|
42628
42603
|
function renderHotfixRelease(r) {
|
|
42629
42604
|
return [
|
|
42630
42605
|
`mmi-cli devops hotfix release: ${r.tag} at ${r.mergedSha.slice(0, 7)} on ${r.repo} (deployModel=${r.deployModel})`,
|
|
@@ -42632,7 +42607,7 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42632
42607
|
` - ${r.tagNote}`,
|
|
42633
42608
|
` - ${r.releaseNote}`,
|
|
42634
42609
|
` - deploy: ${r.deployNote}`,
|
|
42635
|
-
...r.runs.map(
|
|
42610
|
+
...r.runs.map(formatHotfixRun),
|
|
42636
42611
|
` - ${r.verifyNote}`,
|
|
42637
42612
|
...r.announceNote ? [` - announce: ${r.announceNote}`] : [],
|
|
42638
42613
|
` - fold: ${r.foldNote}`,
|
|
@@ -42649,7 +42624,7 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42649
42624
|
return [
|
|
42650
42625
|
`mmi-cli devops hotfix status: ${r.tag} on ${r.repo} \u2014 ${r.state}`,
|
|
42651
42626
|
` - branch: ${r.branchExists ? "pushed" : "absent"} \u2014 PR: ${r.pr ? `#${r.pr.number} ${r.pr.state}` : "none"} \u2014 tag: ${r.tagPushed ? "pushed" : "absent"} \u2014 Release: ${r.releaseExists ? "exists" : "absent"}`,
|
|
42652
|
-
...r.runs.map(
|
|
42627
|
+
...r.runs.map(formatHotfixRun),
|
|
42653
42628
|
` - development fold alignment: ${r.alignmentStatus}${r.alignmentNote ? ` \u2014 ${r.alignmentNote}` : ""}`,
|
|
42654
42629
|
` - npm @mutmutco/cli: ${r.npmVersion}`,
|
|
42655
42630
|
` - next: ${r.next}`,
|
|
@@ -42681,7 +42656,9 @@ function registerTrainOperationsCommands(program3, runProjectInfoSyncCallback) {
|
|
|
42681
42656
|
async function runHotfixSub(sub, body, o, render) {
|
|
42682
42657
|
try {
|
|
42683
42658
|
await requireFreshTrainCli("hotfix");
|
|
42684
|
-
const
|
|
42659
|
+
const raw = await body();
|
|
42660
|
+
const rawRuns = raw.runs;
|
|
42661
|
+
const result = rawRuns ? Object.assign({}, raw, { runs: rawRuns.map(hotfixRunWithEvidence) }) : raw;
|
|
42685
42662
|
const runs = result.runs;
|
|
42686
42663
|
const foldPort = result.foldStatus ?? "ok";
|
|
42687
42664
|
const ledger = result.ledger;
|
|
@@ -43312,7 +43289,8 @@ tenant.command("status <owner/repo> <stage>").description("read tenant runtime r
|
|
|
43312
43289
|
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 \u2014 the promoted/staging ref)").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) => {
|
|
43313
43290
|
if (stage !== "dev" && stage !== "rc" && stage !== "main") return fail("runtime tenant redeploy: <stage> must be dev, rc, or main");
|
|
43314
43291
|
try {
|
|
43315
|
-
const
|
|
43292
|
+
const raw = await runTenantRedeploy(trainApplyDeps(), { repo, stage, ref: o.ref, watch: o.watch });
|
|
43293
|
+
const result = raw.workflowRuns ? { ...raw, workflowRuns: raw.workflowRuns.map(workflowRunWithEvidence) } : raw;
|
|
43316
43294
|
return printLine(o.json ? JSON.stringify(result, null, 2) : renderTenantRedeploy(result));
|
|
43317
43295
|
} catch (e) {
|
|
43318
43296
|
return failGraceful(`runtime tenant redeploy: ${e.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/cli",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.7",
|
|
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",
|
|
@@ -35,9 +35,7 @@
|
|
|
35
35
|
"typecheck": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"commander": "^15.0.0"
|
|
39
|
-
"tree-sitter-wasm": "^1.1.4",
|
|
40
|
-
"web-tree-sitter": "^0.26.12"
|
|
38
|
+
"commander": "^15.0.0"
|
|
41
39
|
},
|
|
42
40
|
"devDependencies": {
|
|
43
41
|
"@types/node": "^22.0.0",
|