mneme-ai 2.113.0 → 2.114.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgJA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6/MvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgJA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkgNvD"}
package/dist/index.js CHANGED
@@ -6694,11 +6694,16 @@ export async function run(argv) {
6694
6694
  const wr = originalWriteErr ?? ((s) => process.stderr.write(s));
6695
6695
  configureRecursive(program, wr);
6696
6696
  };
6697
- const ensureGroupHelp = (cmd) => {
6697
+ // IMPORTANT: never attach a default action to the ROOT program — the root has
6698
+ // its own unknown-command handler (the fuzzy "did you mean …?" suggester). If
6699
+ // the root gets a default action, an unknown verb (`mneme verfy`) is consumed
6700
+ // as an argument → "too many arguments" instead of a helpful suggestion.
6701
+ // (v2.114 fix — the v2.113 walker regressed this by including the root.)
6702
+ const ensureGroupHelp = (cmd, isRoot) => {
6698
6703
  const subs = Array.isArray(cmd.commands) ? cmd.commands : [];
6699
6704
  for (const sub of subs)
6700
- ensureGroupHelp(sub);
6701
- if (subs.length > 0 && !cmd._actionHandler) {
6705
+ ensureGroupHelp(sub, false);
6706
+ if (!isRoot && subs.length > 0 && !cmd._actionHandler) {
6702
6707
  cmd.action(() => { try {
6703
6708
  cmd.outputHelp();
6704
6709
  }
@@ -6706,7 +6711,7 @@ export async function run(argv) {
6706
6711
  }
6707
6712
  };
6708
6713
  try {
6709
- ensureGroupHelp(program);
6714
+ ensureGroupHelp(program, true);
6710
6715
  }
6711
6716
  catch { /* defensive — never block parse */ }
6712
6717
  try {