@mutmutco/cli 3.105.11 → 3.105.12
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 +210 -13
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -19506,6 +19506,102 @@ function applyChecklistCheck(body, query, checked) {
|
|
|
19506
19506
|
return { ok: true, edit: setChecklistMarker(body, sel.item, checked), item: sel.item };
|
|
19507
19507
|
}
|
|
19508
19508
|
|
|
19509
|
+
// src/house-map.ts
|
|
19510
|
+
var HOUSE_ROOTS = ["oracle", "harbour", "devops", "vault", "learning"];
|
|
19511
|
+
function isHouseRoot(token) {
|
|
19512
|
+
return HOUSE_ROOTS.includes(token);
|
|
19513
|
+
}
|
|
19514
|
+
var COMPAT_SHIM_DEATH_WAVE = "Wave 3";
|
|
19515
|
+
var COMPAT_SHIM_NOTE = `compatibility shim \u2014 the flat Wave 0 path; use the canonical house-prefixed form; dies in ${COMPAT_SHIM_DEATH_WAVE} (#4316)`;
|
|
19516
|
+
var HOUSE_QUESTIONS = {
|
|
19517
|
+
oracle: "Is it live?",
|
|
19518
|
+
harbour: "Is it bounded?",
|
|
19519
|
+
devops: "Is it legal?",
|
|
19520
|
+
vault: "Is it guarded?",
|
|
19521
|
+
learning: "Did it learn?",
|
|
19522
|
+
core: "Is it one door?"
|
|
19523
|
+
};
|
|
19524
|
+
var HOUSE_MAP = {
|
|
19525
|
+
// --- oracle — live truth ------------------------------------------------------------------------
|
|
19526
|
+
board: "oracle",
|
|
19527
|
+
// board management (read + the guarded mutations that keep it live)
|
|
19528
|
+
issue: "oracle",
|
|
19529
|
+
// issues are live org truth
|
|
19530
|
+
find: "oracle",
|
|
19531
|
+
// estate search door
|
|
19532
|
+
"repo-index": "oracle",
|
|
19533
|
+
// Hub cloud + local pointer index
|
|
19534
|
+
wave: "oracle",
|
|
19535
|
+
// read-side multi-worktree board visibility (`wave status`)
|
|
19536
|
+
next: "oracle",
|
|
19537
|
+
// read-side board: the next actionable item
|
|
19538
|
+
docs: "oracle",
|
|
19539
|
+
// generated docs surfaces — the live org knowledge routing index
|
|
19540
|
+
org: "oracle",
|
|
19541
|
+
// org projects/registry/access reads (subgroup overrides below)
|
|
19542
|
+
"org project": "oracle",
|
|
19543
|
+
// registry projections (declared + projected live truth)
|
|
19544
|
+
"org access": "oracle",
|
|
19545
|
+
// org access role/audit reads
|
|
19546
|
+
"org config": "oracle",
|
|
19547
|
+
// live org configuration read
|
|
19548
|
+
// --- harbour — declared lanes -------------------------------------------------------------------
|
|
19549
|
+
"org schedules": "harbour",
|
|
19550
|
+
// register/run/park schedule rows under the one lane contract
|
|
19551
|
+
// --- devops — shipping --------------------------------------------------------------------------
|
|
19552
|
+
pr: "devops",
|
|
19553
|
+
ci: "devops",
|
|
19554
|
+
// the CI/gate audit
|
|
19555
|
+
rcand: "devops",
|
|
19556
|
+
release: "devops",
|
|
19557
|
+
hotfix: "devops",
|
|
19558
|
+
train: "devops",
|
|
19559
|
+
"wave land": "devops",
|
|
19560
|
+
// the write-side serial merge train is shipping, not board observation
|
|
19561
|
+
bootstrap: "devops",
|
|
19562
|
+
// repo provisioning + propagate
|
|
19563
|
+
runtime: "devops",
|
|
19564
|
+
// tenant/deploy/box/edge — shipping and central deploy
|
|
19565
|
+
"org rules": "devops",
|
|
19566
|
+
// org-managed repository rule delivery (.gitignore)
|
|
19567
|
+
// --- vault — secrets ----------------------------------------------------------------------------
|
|
19568
|
+
secrets: "vault",
|
|
19569
|
+
"org oauth": "vault",
|
|
19570
|
+
// OAuth credential planning/set/verify
|
|
19571
|
+
// --- learning — self-improvement ----------------------------------------------------------------
|
|
19572
|
+
report: "learning",
|
|
19573
|
+
// friction reports
|
|
19574
|
+
"skill-lesson": "learning",
|
|
19575
|
+
// --- core — the front door itself ---------------------------------------------------------------
|
|
19576
|
+
commands: "core",
|
|
19577
|
+
whoami: "core",
|
|
19578
|
+
worktree: "core",
|
|
19579
|
+
spawn: "core",
|
|
19580
|
+
// this repo's process-spawn contract
|
|
19581
|
+
tests: "core",
|
|
19582
|
+
// this repo's test-policy contract
|
|
19583
|
+
doctor: "core",
|
|
19584
|
+
stage: "core",
|
|
19585
|
+
plugin: "core",
|
|
19586
|
+
// plugin lifecycle + guards (CLI house owns plugins)
|
|
19587
|
+
explain: "core",
|
|
19588
|
+
// command-surface help
|
|
19589
|
+
status: "core",
|
|
19590
|
+
// repo-orientation snapshot (front door — torn toward oracle, kept core)
|
|
19591
|
+
onboard: "core"
|
|
19592
|
+
// repo-readiness orientation (front door — torn toward oracle, kept core)
|
|
19593
|
+
};
|
|
19594
|
+
function houseForPath(path2) {
|
|
19595
|
+
if (path2 === "") return "core";
|
|
19596
|
+
const segments = path2.split(" ");
|
|
19597
|
+
for (let end = segments.length; end > 0; end -= 1) {
|
|
19598
|
+
const key = segments.slice(0, end).join(" ");
|
|
19599
|
+
const house = HOUSE_MAP[key];
|
|
19600
|
+
if (house) return house;
|
|
19601
|
+
}
|
|
19602
|
+
return void 0;
|
|
19603
|
+
}
|
|
19604
|
+
|
|
19509
19605
|
// src/command-taxonomy.ts
|
|
19510
19606
|
var COMMAND_METADATA = /* @__PURE__ */ Symbol.for("mmi.commandTaxonomy.metadata");
|
|
19511
19607
|
var PRIMARY_GROUPS = [
|
|
@@ -19683,9 +19779,6 @@ function applyCommandTaxonomy(program3) {
|
|
|
19683
19779
|
function commandTaxonomyRank(name) {
|
|
19684
19780
|
return TOP_LEVEL_ORDER.get(name) ?? Number.MAX_SAFE_INTEGER;
|
|
19685
19781
|
}
|
|
19686
|
-
function commandHelpGroupRank(group) {
|
|
19687
|
-
return HELP_GROUP_ORDER.get(group) ?? Number.MAX_SAFE_INTEGER;
|
|
19688
|
-
}
|
|
19689
19782
|
function isCanonicalSuggestion(metadata) {
|
|
19690
19783
|
return metadata.category !== "internal";
|
|
19691
19784
|
}
|
|
@@ -19766,9 +19859,16 @@ function buildCommand(cmd, path2) {
|
|
|
19766
19859
|
module_owner: "unclassified",
|
|
19767
19860
|
consumer: "unclassified"
|
|
19768
19861
|
};
|
|
19862
|
+
const house = houseForPath(path2);
|
|
19863
|
+
if (!house) {
|
|
19864
|
+
throw new Error(
|
|
19865
|
+
`command-manifest: command '${path2}' has no house assignment \u2014 add it to cli/src/house-map.ts (the six-house taxonomy; every top-level command maps to exactly one house).`
|
|
19866
|
+
);
|
|
19867
|
+
}
|
|
19769
19868
|
const out = {
|
|
19770
19869
|
name: cmd.name(),
|
|
19771
19870
|
path: path2,
|
|
19871
|
+
house,
|
|
19772
19872
|
arguments: cmd.registeredArguments.map(buildArgument),
|
|
19773
19873
|
// A hand-parsed command registers no Commander options, so its declared set is merged in (#3682).
|
|
19774
19874
|
options: [...cmd.options.map(buildOption), ...readDeclaredOptions(cmd)],
|
|
@@ -19778,6 +19878,7 @@ function buildCommand(cmd, path2) {
|
|
|
19778
19878
|
...metadata
|
|
19779
19879
|
};
|
|
19780
19880
|
if (cmd._allowUnknownOption) out.parses_own_argv = true;
|
|
19881
|
+
if (path2 && house !== "core") out.shim = true;
|
|
19781
19882
|
const description = cmd.description();
|
|
19782
19883
|
if (description) out.description = description;
|
|
19783
19884
|
const examples = readExamples(cmd);
|
|
@@ -19803,6 +19904,22 @@ function collectLeaves(node, acc) {
|
|
|
19803
19904
|
}
|
|
19804
19905
|
for (const child2 of node.subcommands) collectLeaves(child2, acc);
|
|
19805
19906
|
}
|
|
19907
|
+
function buildHouses(tree) {
|
|
19908
|
+
const collect = (node, parentHouse, root, out) => {
|
|
19909
|
+
if (node.house === root && parentHouse !== root) {
|
|
19910
|
+
const entry = { path: node.path };
|
|
19911
|
+
if (node.description) entry.description = node.description;
|
|
19912
|
+
out.push(entry);
|
|
19913
|
+
}
|
|
19914
|
+
for (const child2 of node.subcommands) collect(child2, node.house, root, out);
|
|
19915
|
+
};
|
|
19916
|
+
return HOUSE_ROOTS.map((root) => {
|
|
19917
|
+
const commands = [];
|
|
19918
|
+
for (const top of tree.subcommands) collect(top, void 0, root, commands);
|
|
19919
|
+
commands.sort((a, b) => a.path.localeCompare(b.path));
|
|
19920
|
+
return { root, question: HOUSE_QUESTIONS[root], commands };
|
|
19921
|
+
});
|
|
19922
|
+
}
|
|
19806
19923
|
function buildCommandManifest(program3) {
|
|
19807
19924
|
const tree = buildCommand(program3, "");
|
|
19808
19925
|
const index = [];
|
|
@@ -19816,6 +19933,13 @@ function buildCommandManifest(program3) {
|
|
|
19816
19933
|
name: tree.name,
|
|
19817
19934
|
tree,
|
|
19818
19935
|
index,
|
|
19936
|
+
houses: buildHouses(tree),
|
|
19937
|
+
shim_contract: {
|
|
19938
|
+
canonical: "mmi-cli <house> <command> \u2026",
|
|
19939
|
+
shim: "mmi-cli <command> \u2026",
|
|
19940
|
+
dies: COMPAT_SHIM_DEATH_WAVE,
|
|
19941
|
+
note: COMPAT_SHIM_NOTE
|
|
19942
|
+
},
|
|
19819
19943
|
primary_tree: primaryTree,
|
|
19820
19944
|
primary_index: primaryIndex,
|
|
19821
19945
|
error_codes: ERROR_CODE_REFERENCE
|
|
@@ -19852,16 +19976,26 @@ function formatManifestHuman(manifest, options = {}) {
|
|
|
19852
19976
|
}
|
|
19853
19977
|
if (options.all) for (const child2 of node.subcommands) render(child2, depth + 1);
|
|
19854
19978
|
};
|
|
19855
|
-
|
|
19856
|
-
|
|
19857
|
-
|
|
19858
|
-
|
|
19859
|
-
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
19864
|
-
|
|
19979
|
+
const forHouse = (node, house) => {
|
|
19980
|
+
const subcommands = node.subcommands.map((child2) => forHouse(child2, house)).filter((child2) => Boolean(child2));
|
|
19981
|
+
if (node.house === house) return { ...node, subcommands };
|
|
19982
|
+
return subcommands.length ? { ...node, subcommands } : void 0;
|
|
19983
|
+
};
|
|
19984
|
+
const renderHouse = (house, label) => {
|
|
19985
|
+
const members = root.subcommands.map((command) => forHouse(command, house)).filter((command) => Boolean(command)).sort((a, b) => commandTaxonomyRank(a.name) - commandTaxonomyRank(b.name));
|
|
19986
|
+
if (!members.length) return;
|
|
19987
|
+
lines.push("", `${label}:`);
|
|
19988
|
+
for (const member of members) render(member, 1);
|
|
19989
|
+
};
|
|
19990
|
+
for (const house of HOUSE_ROOTS) renderHouse(house, `${house} \u2014 ${HOUSE_QUESTIONS[house]}`);
|
|
19991
|
+
renderHouse("core", `core \u2014 ${HOUSE_QUESTIONS.core}`);
|
|
19992
|
+
lines.push(
|
|
19993
|
+
"",
|
|
19994
|
+
`Canonical form: \`mmi-cli <house> <command> \u2026\`. The flat paths above are compatibility shims,`,
|
|
19995
|
+
`kept for one window so fleet scripts keep working \u2014 they die in ${COMPAT_SHIM_DEATH_WAVE} (#4316).`,
|
|
19996
|
+
"",
|
|
19997
|
+
options.all ? "Use `mmi-cli explain <group|command>` for a focused map." : "Use `mmi-cli explain <group|command>` for detail or `mmi-cli commands --all` for operational depth."
|
|
19998
|
+
);
|
|
19865
19999
|
return lines.join("\n");
|
|
19866
20000
|
}
|
|
19867
20001
|
|
|
@@ -35286,6 +35420,14 @@ function envelopeAwareWriteErr(str) {
|
|
|
35286
35420
|
}
|
|
35287
35421
|
var program2 = new Command();
|
|
35288
35422
|
program2.name("mmi-cli").description("MMI Future Hub CLI ? the org control plane for agentic coding.").version(resolveClientVersion()).configureOutput({ writeErr: envelopeAwareWriteErr }).showHelpAfterError(PARSE_HINT_SENTINEL);
|
|
35423
|
+
program2.addHelpText(
|
|
35424
|
+
"before",
|
|
35425
|
+
`Houses (canonical roots): oracle \xB7 harbour \xB7 devops \xB7 vault \xB7 learning
|
|
35426
|
+
\`mmi-cli <house> <command> \u2026\` is the canonical form; the flat \`mmi-cli <command> \u2026\` paths below
|
|
35427
|
+
are compatibility shims that die in ${COMPAT_SHIM_DEATH_WAVE} (#4316). \`mmi-cli commands\` shows the
|
|
35428
|
+
house-shaped tree; \`mmi-cli <house> --help\` lists one house.
|
|
35429
|
+
`
|
|
35430
|
+
);
|
|
35289
35431
|
function appActorDeps() {
|
|
35290
35432
|
return {
|
|
35291
35433
|
fetchSecret: async (key) => fetchSecretValue(makeSecretsDeps(await loadConfig()), key, { repo: APP_VAULT_REPO }),
|
|
@@ -38319,6 +38461,61 @@ program2.command("session-start").description("run the SessionStart verbs (whoam
|
|
|
38319
38461
|
installProcessBackstop();
|
|
38320
38462
|
consolidateCommandNamespaces(program2);
|
|
38321
38463
|
applyCommandTaxonomy(program2);
|
|
38464
|
+
function resolveHouseShim(argv) {
|
|
38465
|
+
const houseToken = argv[2];
|
|
38466
|
+
if (!houseToken) return;
|
|
38467
|
+
if (!isHouseRoot(houseToken)) {
|
|
38468
|
+
return;
|
|
38469
|
+
}
|
|
38470
|
+
const remainder = argv.slice(3);
|
|
38471
|
+
const first = remainder[0];
|
|
38472
|
+
if (!first || first === "--help" || first === "-h") {
|
|
38473
|
+
printHouseRootHelp(houseToken);
|
|
38474
|
+
hardExit(0);
|
|
38475
|
+
}
|
|
38476
|
+
const commandTokens = remainder.slice(0, 2).filter((tok) => !tok.startsWith("-"));
|
|
38477
|
+
const lookupPath = commandTokens.join(" ");
|
|
38478
|
+
if (!lookupPath) {
|
|
38479
|
+
printHouseRootHelp(houseToken);
|
|
38480
|
+
hardExit(2);
|
|
38481
|
+
}
|
|
38482
|
+
const actual = houseForPath(lookupPath);
|
|
38483
|
+
if (actual === houseToken) {
|
|
38484
|
+
argv.splice(2, 1);
|
|
38485
|
+
return;
|
|
38486
|
+
}
|
|
38487
|
+
const canonical = actual ? `mmi-cli ${actual === "core" ? "" : `${actual} `}${lookupPath}`.replace(/\s+/g, " ").trim() : void 0;
|
|
38488
|
+
if (actual) {
|
|
38489
|
+
process.stderr.write(
|
|
38490
|
+
`mmi-cli ${houseToken}: '${lookupPath}' lives in house '${actual}' \u2014 run: ${canonical} \u2026
|
|
38491
|
+
`
|
|
38492
|
+
);
|
|
38493
|
+
} else {
|
|
38494
|
+
process.stderr.write(
|
|
38495
|
+
`mmi-cli ${houseToken}: '${first}' is not a command of house '${houseToken}' \u2014 run \`mmi-cli ${houseToken} --help\` for its commands
|
|
38496
|
+
`
|
|
38497
|
+
);
|
|
38498
|
+
}
|
|
38499
|
+
hardExit(2);
|
|
38500
|
+
}
|
|
38501
|
+
function printHouseRootHelp(house) {
|
|
38502
|
+
const manifest = buildCommandManifest(program2);
|
|
38503
|
+
const commands = manifest.houses.find((entry) => entry.root === house)?.commands ?? [];
|
|
38504
|
+
const lines = [
|
|
38505
|
+
`mmi-cli ${house} \u2014 the ${house} house (${HOUSE_QUESTIONS[house]}), ${commands.length} command${commands.length === 1 ? "" : "s"}:`,
|
|
38506
|
+
""
|
|
38507
|
+
];
|
|
38508
|
+
for (const cmd of commands) {
|
|
38509
|
+
lines.push(cmd.description ? ` ${cmd.path} \u2014 ${cmd.description}` : ` ${cmd.path}`);
|
|
38510
|
+
}
|
|
38511
|
+
lines.push(
|
|
38512
|
+
"",
|
|
38513
|
+
`Canonical: \`mmi-cli ${house} <command> \u2026\`. The flat \`mmi-cli <command> \u2026\` form is a compatibility`,
|
|
38514
|
+
`shim keeping fleet scripts working for one window \u2014 shims die in ${COMPAT_SHIM_DEATH_WAVE} (#4316).`
|
|
38515
|
+
);
|
|
38516
|
+
consoleIo.log(lines.join("\n"));
|
|
38517
|
+
}
|
|
38518
|
+
resolveHouseShim(process.argv);
|
|
38322
38519
|
program2.parseAsync(process.argv).then(() => finishCliRun()).catch((e) => failGraceful(e.message));
|
|
38323
38520
|
// Annotate the CommonJS export names for ESM import in node:
|
|
38324
38521
|
0 && (module.exports = {
|
package/package.json
CHANGED