@pugi/cli 0.1.0-beta.7 → 0.1.0-beta.8

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.
@@ -49,7 +49,7 @@ import { dispatchEdit, } from '../core/edits/index.js';
49
49
  * packages/pugi-sdk/package.json); the publish workflow validates the
50
50
  * three are in lockstep.
51
51
  */
52
- const PUGI_CLI_VERSION = "0.1.0-beta.7";
52
+ const PUGI_CLI_VERSION = "0.1.0-beta.8";
53
53
  const handlers = {
54
54
  accounts,
55
55
  agents: dispatchAgents,
@@ -529,8 +529,20 @@ function parseArgs(argv) {
529
529
  }
530
530
  }
531
531
  const isBareInvocation = args.length === 0;
532
+ const command = args.shift() ?? 'help';
533
+ // Sprint α6.X CEO dogfood 2026-05-26 (P0 hot-fix): trailing `--help`
534
+ // / `-h` on ANY sub-command must route to the help printer rather
535
+ // than dispatching the real engine. Before this guard `pugi build
536
+ // --help` burned 86k tokens running the actual build loop because
537
+ // the dispatcher saw `--help` as an opaque arg and forwarded it
538
+ // through to the engine. Re-routing here means `pugi <cmd> --help`
539
+ // becomes `pugi help <cmd>` deterministically across the entire
540
+ // command tree.
541
+ if (args.includes('--help') || args.includes('-h')) {
542
+ return { command: 'help', args: [command], flags, isBareInvocation: false };
543
+ }
532
544
  return {
533
- command: args.shift() ?? 'help',
545
+ command,
534
546
  args,
535
547
  flags,
536
548
  isBareInvocation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pugi/cli",
3
- "version": "0.1.0-beta.7",
3
+ "version": "0.1.0-beta.8",
4
4
  "description": "Pugi CLI - terminal-native software execution system",
5
5
  "homepage": "https://pugi.io",
6
6
  "repository": {
@@ -52,7 +52,7 @@
52
52
  "undici": "^8.3.0",
53
53
  "zod": "^3.23.0",
54
54
  "@pugi/personas": "0.1.2",
55
- "@pugi/sdk": "0.1.0-beta.7"
55
+ "@pugi/sdk": "0.1.0-beta.8"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "^22.0.0",