@cleocode/cleo 2026.4.113 → 2026.4.114

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/cli/index.js CHANGED
@@ -31868,6 +31868,17 @@ function resolveFormat(opts, defaults) {
31868
31868
 
31869
31869
  // packages/cleo/src/cli/commands/adapter.ts
31870
31870
  init_cli();
31871
+
31872
+ // packages/cleo/src/cli/lib/subcommand-guard.ts
31873
+ function isSubCommandDispatch(rawArgs, subCommands2) {
31874
+ if (!rawArgs || !subCommands2) return false;
31875
+ const firstArg = rawArgs.find((a) => !a.startsWith("-"));
31876
+ if (!firstArg) return false;
31877
+ if (typeof subCommands2 !== "object") return false;
31878
+ return firstArg in subCommands2;
31879
+ }
31880
+
31881
+ // packages/cleo/src/cli/commands/adapter.ts
31871
31882
  var listCommand = defineCommand({
31872
31883
  meta: { name: "list", description: "List all discovered provider adapters" },
31873
31884
  async run() {
@@ -31979,7 +31990,8 @@ var adapterCommand = defineCommand({
31979
31990
  activate: activateCommand,
31980
31991
  dispose: disposeCommand
31981
31992
  },
31982
- async run() {
31993
+ async run({ cmd, rawArgs }) {
31994
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
31983
31995
  await dispatchFromCli(
31984
31996
  "query",
31985
31997
  "tools",
@@ -36381,7 +36393,8 @@ var backupCommand = defineCommand({
36381
36393
  import: importCommand,
36382
36394
  inspect: backupInspectSubCommand
36383
36395
  },
36384
- async run() {
36396
+ async run({ cmd, rawArgs }) {
36397
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
36385
36398
  await dispatchFromCli("mutate", "admin", "backup", {}, { command: "backup" });
36386
36399
  }
36387
36400
  });
@@ -39056,7 +39069,8 @@ var daemonCommand = defineCommand({
39056
39069
  stop: stopCommand3,
39057
39070
  status: statusCommand4
39058
39071
  },
39059
- async run({ args }) {
39072
+ async run({ args, cmd, rawArgs }) {
39073
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
39060
39074
  const cleoDir = args["cleo-dir"] ?? join11(homedir2(), ".cleo");
39061
39075
  await showDaemonStatus(cleoDir, args.json ?? false);
39062
39076
  }
@@ -43025,7 +43039,8 @@ var manifestCommand = defineCommand({
43025
43039
  append: appendCommand,
43026
43040
  archive: archiveCommand2
43027
43041
  },
43028
- async run({ cmd }) {
43042
+ async run({ cmd, rawArgs }) {
43043
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
43029
43044
  await showUsage(cmd);
43030
43045
  }
43031
43046
  });
@@ -51625,7 +51640,8 @@ var providerCommand = defineCommand({
51625
51640
  hooks: hooksCommand,
51626
51641
  inject: injectCommand2
51627
51642
  },
51628
- async run() {
51643
+ async run({ cmd, rawArgs }) {
51644
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
51629
51645
  await dispatchFromCli(
51630
51646
  "query",
51631
51647
  "tools",
@@ -54512,7 +54528,8 @@ var baselineSub = defineCommand({
54512
54528
  subCommands: {
54513
54529
  capture: baselineCaptureSub
54514
54530
  },
54515
- async run({ args }) {
54531
+ async run({ args, cmd, rawArgs }) {
54532
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
54516
54533
  const jsonMode = args.json === true;
54517
54534
  emitSuccess(
54518
54535
  { message: "Use: cleo sentient baseline capture <sha>" },
@@ -54625,7 +54642,8 @@ var allowlistSub = defineCommand({
54625
54642
  add: allowlistAddSub,
54626
54643
  remove: allowlistRemoveSub
54627
54644
  },
54628
- async run({ args }) {
54645
+ async run({ args, cmd, rawArgs }) {
54646
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
54629
54647
  const jsonMode = args.json === true;
54630
54648
  emitSuccess(
54631
54649
  { message: "Use: cleo sentient allowlist list|add|remove" },
@@ -54650,7 +54668,8 @@ var sentientCommand = defineCommand({
54650
54668
  baseline: baselineSub,
54651
54669
  allowlist: allowlistSub
54652
54670
  },
54653
- async run({ args }) {
54671
+ async run({ args, cmd, rawArgs }) {
54672
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
54654
54673
  const projectRoot = resolveProjectRoot7(args.project);
54655
54674
  const jsonMode = args.json === true;
54656
54675
  try {
@@ -55617,7 +55636,8 @@ var skillsCommand2 = defineCommand({
55617
55636
  deps: depsCommand3,
55618
55637
  "spawn-providers": spawnProvidersCommand
55619
55638
  },
55620
- async run() {
55639
+ async run({ cmd, rawArgs }) {
55640
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
55621
55641
  await dispatchFromCli(
55622
55642
  "query",
55623
55643
  "tools",
@@ -55789,7 +55809,8 @@ var statsCommand6 = defineCommand({
55789
55809
  subCommands: {
55790
55810
  compliance: complianceCommand2
55791
55811
  },
55792
- async run({ args }) {
55812
+ async run({ args, cmd, rawArgs }) {
55813
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
55793
55814
  await dispatchFromCli(
55794
55815
  "query",
55795
55816
  "admin",