nexus-agents 2.55.1 → 2.56.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.
package/dist/cli.d.ts CHANGED
@@ -50,6 +50,7 @@ interface ParsedCliArgs {
50
50
  version: boolean;
51
51
  verbose: boolean;
52
52
  interactive: boolean;
53
+ all: boolean;
53
54
  mode: ServerMode;
54
55
  output?: string;
55
56
  force: boolean;
@@ -122,8 +123,12 @@ interface ParsedCliArgs {
122
123
 
123
124
  /**
124
125
  * Prints help text to stdout.
126
+ *
127
+ * Default output hides maintainer commands (benchmarks, release tooling, deep
128
+ * diagnostics). Pass `--all` to include them. See `cli-command-catalog.ts` for
129
+ * the audience classification.
125
130
  */
126
- declare function printHelp(): void;
131
+ declare function printHelp(args?: ParsedCliArgs): void;
127
132
  /**
128
133
  * Prints version information to stdout.
129
134
  */
package/dist/cli.js CHANGED
@@ -14,28 +14,23 @@ import {
14
14
  } from "./chunk-6E3NMMEY.js";
15
15
  import "./chunk-4FVISCDB.js";
16
16
  import {
17
- setupCommandAsync
18
- } from "./chunk-XYCS5X3H.js";
17
+ setupCommandAsync,
18
+ verifyCommand
19
+ } from "./chunk-KGMC6F5D.js";
19
20
  import "./chunk-EKYT4NMD.js";
20
21
  import {
21
22
  AuthHandler,
22
- CustomExpertDefinitionSchema,
23
- DEFAULTS,
24
23
  DEFAULT_EXPERTS,
25
24
  DEFAULT_SWE_BENCH_CONFIG,
26
25
  DEVELOPMENT_POLICY,
27
26
  ExpertFactory,
28
27
  FeedbackIntegration,
29
- MAX_SYSTEM_PROMPT_LENGTH,
30
28
  Orchestrator,
31
29
  PuppeteerOrchestrator,
32
30
  READONLY_POLICY,
33
31
  SwarmObserver,
34
- VALID_EXPERT_DOMAINS,
35
- VALID_EXPERT_TIERS,
36
32
  ValidationDashboard,
37
33
  WorkflowDefinitionSchema,
38
- adaptRoutingConfig,
39
34
  addResearchPaper,
40
35
  analyzeTools,
41
36
  createAgentStages,
@@ -61,7 +56,6 @@ import {
61
56
  createTestingExpert,
62
57
  createToolObservabilityProxy,
63
58
  createToolRateLimiterFactory,
64
- defaultConfig,
65
59
  detectBackend,
66
60
  discoverDeepMind,
67
61
  discoverGitHubRepos,
@@ -83,8 +77,6 @@ import {
83
77
  generateSwarmVisualization,
84
78
  generateSystemSummary,
85
79
  getCompletedInstanceIds,
86
- getConfig,
87
- getConfigManager,
88
80
  getDatasetInfo,
89
81
  getDefaultTokenPath,
90
82
  getEventBusStats,
@@ -103,7 +95,6 @@ import {
103
95
  initializeSandbox,
104
96
  initializeSica,
105
97
  loadAllExternalPacks,
106
- loadConfig,
107
98
  loadDataset,
108
99
  loadSourcesRegistry,
109
100
  loadWorkflowFile,
@@ -148,10 +139,9 @@ import {
148
139
  setGlobalToolRateLimiterFactory,
149
140
  validateArgs,
150
141
  validateCommand,
151
- validateNexusEnv,
152
142
  validateWorkflow,
153
143
  wrapInMarkdownFence
154
- } from "./chunk-KVWHK72T.js";
144
+ } from "./chunk-EJLWDYK7.js";
155
145
  import {
156
146
  resolveToken
157
147
  } from "./chunk-2SPRLBOS.js";
@@ -177,7 +167,7 @@ import {
177
167
  loadTechniquesRegistry,
178
168
  savePapersRegistry,
179
169
  synthesizeResearch
180
- } from "./chunk-JERFBN73.js";
170
+ } from "./chunk-PCMWLXT4.js";
181
171
  import {
182
172
  classifyTrust,
183
173
  createFullGitHubProvider,
@@ -192,17 +182,26 @@ import "./chunk-AP2FD37C.js";
192
182
  import "./chunk-BQ4YXGGQ.js";
193
183
  import "./chunk-ED6VQWNG.js";
194
184
  import {
195
- BUILT_IN_EXPERTS
196
- } from "./chunk-GJVHRJO2.js";
197
- import {
185
+ CustomExpertDefinitionSchema,
186
+ DEFAULTS,
187
+ MAX_SYSTEM_PROMPT_LENGTH,
188
+ VALID_EXPERT_DOMAINS,
189
+ VALID_EXPERT_TIERS,
198
190
  VERSION,
191
+ adaptRoutingConfig,
199
192
  closeServer,
200
193
  connectTransport,
201
194
  createServer,
202
195
  doctorCommand,
196
+ getConfig,
197
+ getConfigManager,
203
198
  initDataDirectories,
204
- runDoctor
205
- } from "./chunk-OC7RMLN2.js";
199
+ loadConfig,
200
+ runDoctor,
201
+ validateNexusEnv
202
+ } from "./chunk-C3FGEDD7.js";
203
+ import "./chunk-NUBSJGQZ.js";
204
+ import "./chunk-GJVHRJO2.js";
206
205
  import "./chunk-NYNBDP7M.js";
207
206
  import {
208
207
  MemoryError
@@ -9389,21 +9388,22 @@ function getCommandOptions(name, cliOptions) {
9389
9388
  }
9390
9389
  return cmdOptions;
9391
9390
  }
9391
+ function loadHelpTextCommands(project, packageRoot, typesFile) {
9392
+ const helpTextPath = path12.join(packageRoot, "src/cli-help-text.ts");
9393
+ const helpTextFile = project.getSourceFile(helpTextPath) ?? typesFile;
9394
+ if (helpTextFile === void 0) return [];
9395
+ const helpTextVar = helpTextFile.getVariableDeclaration("HELP_TEXT");
9396
+ if (helpTextVar === void 0) return [];
9397
+ const helpText = helpTextVar.getInitializer()?.getText() ?? "";
9398
+ const cleanText = helpText.slice(1, -1).replace(/^\s*\n/, "").replace(/\n\s*$/, "");
9399
+ return parseHelpTextCommands(cleanText);
9400
+ }
9392
9401
  function extractCliCommands(project, packageRoot, cliCommandsPath, cliTypesPath) {
9393
9402
  const commands = [];
9394
9403
  const typesFullPath = path12.join(packageRoot, cliTypesPath);
9395
9404
  const typesFile = project.getSourceFile(typesFullPath);
9396
- let helpTextCommands = [];
9397
- let cliOptions = /* @__PURE__ */ new Map();
9398
- if (typesFile !== void 0) {
9399
- const helpTextVar = typesFile.getVariableDeclaration("HELP_TEXT");
9400
- if (helpTextVar !== void 0) {
9401
- const helpText = helpTextVar.getInitializer()?.getText() ?? "";
9402
- const cleanText = helpText.slice(1, -1).replace(/^\s*\n/, "").replace(/\n\s*$/, "");
9403
- helpTextCommands = parseHelpTextCommands(cleanText);
9404
- }
9405
- cliOptions = extractCliOptions(typesFile);
9406
- }
9405
+ const helpTextCommands = loadHelpTextCommands(project, packageRoot, typesFile);
9406
+ const cliOptions = typesFile !== void 0 ? extractCliOptions(typesFile) : /* @__PURE__ */ new Map();
9407
9407
  const commandsFullPath = path12.join(packageRoot, cliCommandsPath);
9408
9408
  const commandsFile = project.getSourceFile(commandsFullPath);
9409
9409
  if (commandsFile === void 0) return commands;
@@ -9499,7 +9499,11 @@ function extractToolsFromFile(sourceFile, relativePath) {
9499
9499
  if (args.length < 2) continue;
9500
9500
  const nameArg = args[0];
9501
9501
  if (nameArg === void 0) continue;
9502
- const toolName = nameArg.getText().replace(/['"]/g, "");
9502
+ const nameKind = nameArg.getKind();
9503
+ if (nameKind !== SyntaxKind2.StringLiteral && nameKind !== SyntaxKind2.NoSubstitutionTemplateLiteral) {
9504
+ continue;
9505
+ }
9506
+ const toolName = nameArg.getText().replace(/['"`]/g, "");
9503
9507
  const { description, schemaArg } = extractToolMeta(callText, args, sourceFile);
9504
9508
  let parameters = [];
9505
9509
  if (schemaArg !== void 0) {
@@ -9591,6 +9595,11 @@ function createProject(opts) {
9591
9595
  project.addSourceFilesAtPaths([
9592
9596
  path14.join(opts.packageRoot, opts.cliCommandsPath),
9593
9597
  path14.join(opts.packageRoot, "src/cli-types.ts"),
9598
+ // HELP_TEXT was extracted to cli-help-text.ts in #293 (Jan 2026) and
9599
+ // cli-types.ts now only re-exports it. The extractor reads it via AST,
9600
+ // so we have to load the defining file — a bare re-export isn't enough.
9601
+ // Without this line the CLI command list silently came back empty.
9602
+ path14.join(opts.packageRoot, "src/cli-help-text.ts"),
9594
9603
  path14.join(opts.packageRoot, opts.mcpToolsPath, "*.ts")
9595
9604
  ]);
9596
9605
  return project;
@@ -10409,182 +10418,6 @@ function parseValidationArgs(positionals, format, verbose) {
10409
10418
  return options;
10410
10419
  }
10411
10420
 
10412
- // src/cli/verify-command.ts
10413
- function checkNodeVersion() {
10414
- const version = process.version;
10415
- const major = parseInt(version.slice(1).split(".")[0] ?? "0", 10);
10416
- if (major >= 22) {
10417
- return {
10418
- name: "Node.js Version",
10419
- passed: true,
10420
- message: `${version} (LTS)`
10421
- };
10422
- }
10423
- if (major >= 18) {
10424
- return {
10425
- name: "Node.js Version",
10426
- passed: true,
10427
- message: `${version} (supported, recommend 22.x LTS)`
10428
- };
10429
- }
10430
- return {
10431
- name: "Node.js Version",
10432
- passed: false,
10433
- message: `${version} (unsupported)`,
10434
- fix: "Install Node.js 22.x LTS from https://nodejs.org"
10435
- };
10436
- }
10437
- function checkPackageExports() {
10438
- try {
10439
- const hasVersion = typeof VERSION === "string" && VERSION.length > 0;
10440
- const hasConfig = typeof defaultConfig === "object";
10441
- const hasBuiltInExperts = typeof BUILT_IN_EXPERTS === "object";
10442
- if (hasVersion && hasConfig && hasBuiltInExperts) {
10443
- return {
10444
- name: "Package Exports",
10445
- passed: true,
10446
- message: "All core modules accessible"
10447
- };
10448
- }
10449
- return {
10450
- name: "Package Exports",
10451
- passed: false,
10452
- message: "Some modules failed to load",
10453
- fix: "Try reinstalling: npm install -g nexus-agents"
10454
- };
10455
- } catch {
10456
- return {
10457
- name: "Package Exports",
10458
- passed: false,
10459
- message: "Failed to load core modules",
10460
- fix: "Try reinstalling: npm install -g nexus-agents"
10461
- };
10462
- }
10463
- }
10464
- function checkConfigLoading() {
10465
- try {
10466
- const hasModels = typeof defaultConfig.models === "object";
10467
- const hasSecurity = typeof defaultConfig.security === "object";
10468
- if (hasModels && hasSecurity) {
10469
- return {
10470
- name: "Configuration",
10471
- passed: true,
10472
- message: "Default config accessible"
10473
- };
10474
- }
10475
- return {
10476
- name: "Configuration",
10477
- passed: true,
10478
- // Config errors are not fatal for verification
10479
- message: "Using default configuration"
10480
- };
10481
- } catch {
10482
- return {
10483
- name: "Configuration",
10484
- passed: true,
10485
- // Still works with defaults
10486
- message: "Using default configuration"
10487
- };
10488
- }
10489
- }
10490
- function checkExpertSystem() {
10491
- const expertTypes = Object.keys(BUILT_IN_EXPERTS);
10492
- const count = expertTypes.length;
10493
- if (count >= 5) {
10494
- return {
10495
- name: "Expert System",
10496
- passed: true,
10497
- message: `${String(count)} expert types available`
10498
- };
10499
- }
10500
- return {
10501
- name: "Expert System",
10502
- passed: false,
10503
- message: "Expert types not loaded",
10504
- fix: "Try reinstalling: npm install -g nexus-agents"
10505
- };
10506
- }
10507
- function runVerify() {
10508
- const time = getTimeProvider();
10509
- const startTime = time.now();
10510
- const checks = [
10511
- checkNodeVersion(),
10512
- checkPackageExports(),
10513
- checkConfigLoading(),
10514
- checkExpertSystem()
10515
- ];
10516
- const allPassed = checks.every((c) => c.passed);
10517
- const durationMs = time.now() - startTime;
10518
- return Promise.resolve({
10519
- version: VERSION,
10520
- nodeVersion: process.version,
10521
- checks,
10522
- allPassed,
10523
- durationMs
10524
- });
10525
- }
10526
- function formatCheck(check) {
10527
- const symbol = check.passed ? `${colors.green}${symbols.check}${colors.reset}` : `${colors.red}${symbols.cross}${colors.reset}`;
10528
- let line = ` ${symbol} ${check.name}: ${check.message}`;
10529
- if (!check.passed && check.fix !== void 0) {
10530
- line += `
10531
- ${colors.dim}Fix: ${check.fix}${colors.reset}`;
10532
- }
10533
- return line;
10534
- }
10535
- function printVerifyResult(result, verbose) {
10536
- process.stdout.write("\n");
10537
- process.stdout.write(`${colors.bold}nexus-agents verify${colors.reset}
10538
- `);
10539
- process.stdout.write("===================\n");
10540
- process.stdout.write("\n");
10541
- process.stdout.write(`Version: ${result.version}
10542
- `);
10543
- process.stdout.write(`Node.js: ${result.nodeVersion}
10544
- `);
10545
- process.stdout.write("\n");
10546
- process.stdout.write(`${colors.cyan}Running checks...${colors.reset}
10547
- `);
10548
- process.stdout.write("\n");
10549
- for (const check of result.checks) {
10550
- process.stdout.write(formatCheck(check) + "\n");
10551
- }
10552
- process.stdout.write("\n");
10553
- if (result.allPassed) {
10554
- process.stdout.write(
10555
- `${colors.green}${colors.bold}Installation verified successfully!${colors.reset}
10556
- `
10557
- );
10558
- process.stdout.write("\n");
10559
- process.stdout.write(`${colors.cyan}Next steps:${colors.reset}
10560
- `);
10561
- process.stdout.write(' 1. Run "nexus-agents doctor" to check external CLI integrations\n');
10562
- process.stdout.write(
10563
- ' 2. Run "nexus-agents review --setup" to configure GitHub integration\n'
10564
- );
10565
- process.stdout.write(' 3. Try "nexus-agents --help" for all available commands\n');
10566
- } else {
10567
- const failedCount = result.checks.filter((c) => !c.passed).length;
10568
- process.stdout.write(
10569
- `${colors.red}${colors.bold}Verification failed: ${String(failedCount)} issue(s) found${colors.reset}
10570
- `
10571
- );
10572
- process.stdout.write("\n");
10573
- process.stdout.write("Please fix the issues above and try again.\n");
10574
- }
10575
- process.stdout.write("\n");
10576
- if (verbose) {
10577
- process.stdout.write(`${colors.dim}Duration: ${String(result.durationMs)}ms${colors.reset}
10578
- `);
10579
- process.stdout.write("\n");
10580
- }
10581
- }
10582
- async function verifyCommand(options) {
10583
- const result = await runVerify();
10584
- printVerifyResult(result, options.verbose);
10585
- return result.allPassed ? 0 : 1;
10586
- }
10587
-
10588
10421
  // src/cli/swe-bench-command.ts
10589
10422
  import * as os2 from "os";
10590
10423
  import * as path18 from "path";
@@ -16910,6 +16743,230 @@ function authCommand(subcommand, options) {
16910
16743
  }
16911
16744
  }
16912
16745
 
16746
+ // src/cli-command-catalog.ts
16747
+ var COMMAND_CATALOG = [
16748
+ // ── Essential ────────────────────────────────────────────────────────────
16749
+ {
16750
+ command: "(default)",
16751
+ description: "Start MCP server with stdio transport",
16752
+ audience: "essential"
16753
+ },
16754
+ {
16755
+ command: "hello",
16756
+ description: "Show welcome message and quick start (no API keys needed)",
16757
+ audience: "essential"
16758
+ },
16759
+ {
16760
+ command: "setup",
16761
+ description: "Configure CLI integration (MCP + .rules + data dirs)",
16762
+ audience: "essential"
16763
+ },
16764
+ {
16765
+ command: "verify",
16766
+ description: "Check install health (sqlite, adapters, config)",
16767
+ audience: "essential"
16768
+ },
16769
+ {
16770
+ command: "doctor",
16771
+ description: "Detailed system/adapter health check",
16772
+ audience: "essential"
16773
+ },
16774
+ {
16775
+ command: "config",
16776
+ description: "Manage configuration (init, get, set, list, export, import)",
16777
+ audience: "essential"
16778
+ },
16779
+ {
16780
+ command: "orchestrate",
16781
+ description: "Execute a task via CLI tools (standalone mode)",
16782
+ audience: "essential"
16783
+ },
16784
+ {
16785
+ command: "vote",
16786
+ description: "Run consensus vote on a proposal (5-6 agents)",
16787
+ audience: "essential"
16788
+ },
16789
+ {
16790
+ command: "workflow",
16791
+ description: "Manage and run workflow templates (list, run)",
16792
+ audience: "essential"
16793
+ },
16794
+ {
16795
+ command: "expert",
16796
+ description: "Manage expert agents (list, create, execute)",
16797
+ audience: "essential"
16798
+ },
16799
+ {
16800
+ command: "research",
16801
+ description: "Manage research registry (status, add, stats, refresh)",
16802
+ audience: "essential"
16803
+ },
16804
+ // ── Advanced ─────────────────────────────────────────────────────────────
16805
+ {
16806
+ command: "session",
16807
+ description: "Manage session persistence (list, show, export, delete)",
16808
+ audience: "advanced"
16809
+ },
16810
+ {
16811
+ command: "auth",
16812
+ description: "Manage MCP authentication tokens (init, show, rotate)",
16813
+ audience: "advanced"
16814
+ },
16815
+ {
16816
+ command: "status",
16817
+ description: "At-a-glance project health dashboard",
16818
+ audience: "advanced"
16819
+ },
16820
+ {
16821
+ command: "capabilities",
16822
+ description: "Show model capabilities matrix",
16823
+ audience: "advanced"
16824
+ },
16825
+ {
16826
+ command: "review",
16827
+ description: "Review a GitHub PR (dogfooding helper)",
16828
+ audience: "advanced"
16829
+ },
16830
+ {
16831
+ command: "scaffold",
16832
+ description: "Generate project files from templates",
16833
+ audience: "advanced"
16834
+ },
16835
+ {
16836
+ command: "validate",
16837
+ description: "Run unified validation (doctor + fitness + config)",
16838
+ audience: "advanced"
16839
+ },
16840
+ {
16841
+ command: "index",
16842
+ description: "Generate and manage codebase index",
16843
+ audience: "advanced"
16844
+ },
16845
+ // ── Maintainer (hidden by default) ───────────────────────────────────────
16846
+ {
16847
+ command: "demo",
16848
+ description: "API-free exploration mode (marketing/demo flow)",
16849
+ audience: "maintainer"
16850
+ },
16851
+ {
16852
+ command: "hooks",
16853
+ description: "Claude CLI hook integration commands",
16854
+ audience: "maintainer"
16855
+ },
16856
+ {
16857
+ command: "routing-audit",
16858
+ description: "Debug model routing decisions",
16859
+ audience: "maintainer"
16860
+ },
16861
+ {
16862
+ command: "fitness-audit",
16863
+ description: "Run CLI orchestration fitness score audit",
16864
+ audience: "maintainer"
16865
+ },
16866
+ {
16867
+ command: "system-review",
16868
+ description: "Automated system review (5-phase checklist)",
16869
+ audience: "maintainer"
16870
+ },
16871
+ {
16872
+ command: "sprint",
16873
+ description: "Automated sprint planning from open issues",
16874
+ audience: "maintainer"
16875
+ },
16876
+ {
16877
+ command: "evaluate",
16878
+ description: "Self-evaluation of codebase components",
16879
+ audience: "maintainer"
16880
+ },
16881
+ {
16882
+ command: "issue",
16883
+ description: "Issue template validation and management",
16884
+ audience: "maintainer"
16885
+ },
16886
+ {
16887
+ command: "validation",
16888
+ description: "Learning validation dashboard",
16889
+ audience: "maintainer"
16890
+ },
16891
+ {
16892
+ command: "learning-metrics",
16893
+ description: "Aggregated learning metrics dashboard",
16894
+ audience: "maintainer"
16895
+ },
16896
+ {
16897
+ command: "swe-bench",
16898
+ description: "Run SWE-bench evaluation benchmark",
16899
+ audience: "maintainer"
16900
+ },
16901
+ {
16902
+ command: "atbench",
16903
+ description: "Run ATBench trajectory-safety evaluation",
16904
+ audience: "maintainer"
16905
+ },
16906
+ {
16907
+ command: "visualize",
16908
+ description: "Generate Mermaid diagrams and ASCII dashboards",
16909
+ audience: "maintainer"
16910
+ },
16911
+ {
16912
+ command: "health",
16913
+ description: "Swarm health metrics dashboard",
16914
+ audience: "maintainer"
16915
+ },
16916
+ {
16917
+ command: "release-notes",
16918
+ description: "Generate release notes from git commits",
16919
+ audience: "maintainer"
16920
+ },
16921
+ {
16922
+ command: "release-validate",
16923
+ description: "Run expert swarm validation for releases",
16924
+ audience: "maintainer"
16925
+ },
16926
+ {
16927
+ command: "release-announce",
16928
+ description: "Generate release announcements (blog, social)",
16929
+ audience: "maintainer"
16930
+ }
16931
+ ];
16932
+ function filterCatalog(showAll) {
16933
+ if (showAll) return COMMAND_CATALOG;
16934
+ return COMMAND_CATALOG.filter((e) => e.audience !== "maintainer");
16935
+ }
16936
+ function groupByAudience(entries) {
16937
+ const groups = /* @__PURE__ */ new Map();
16938
+ for (const entry of entries) {
16939
+ const existing = groups.get(entry.audience) ?? [];
16940
+ existing.push(entry);
16941
+ groups.set(entry.audience, existing);
16942
+ }
16943
+ return groups;
16944
+ }
16945
+ var AUDIENCE_HEADINGS = {
16946
+ essential: "Essential \u2014 install, configure, run",
16947
+ advanced: "Advanced \u2014 day-to-day extras",
16948
+ maintainer: "Maintainer \u2014 benchmarks, releases, deep diagnostics"
16949
+ };
16950
+ function renderCommandsSection(showAll) {
16951
+ const filtered = filterCatalog(showAll);
16952
+ const groups = groupByAudience(filtered);
16953
+ const lines = [];
16954
+ const order = showAll ? ["essential", "advanced", "maintainer"] : ["essential", "advanced"];
16955
+ for (const audience of order) {
16956
+ const entries = groups.get(audience);
16957
+ if (entries === void 0 || entries.length === 0) continue;
16958
+ lines.push(` ${AUDIENCE_HEADINGS[audience]}`);
16959
+ for (const entry of entries) {
16960
+ lines.push(` ${entry.command.padEnd(16)} ${entry.description}`);
16961
+ }
16962
+ lines.push("");
16963
+ }
16964
+ if (!showAll) {
16965
+ lines.push(" Run with --all to show maintainer commands (benchmarks, release tooling).");
16966
+ }
16967
+ return lines.join("\n").replace(/\n+$/, "");
16968
+ }
16969
+
16913
16970
  // src/cli-help-text.ts
16914
16971
  var HELP_TEXT = `
16915
16972
  nexus-agents - Intelligent orchestration platform for AI coding tools
@@ -17294,6 +17351,15 @@ EXAMPLES:
17294
17351
 
17295
17352
  For more information, visit: https://github.com/williamzujkowski/nexus-agents
17296
17353
  `.trim();
17354
+ var COMMANDS_BLOCK_RE = /COMMANDS:\n([\s\S]*?)\n\nOPTIONS:/;
17355
+ function renderHelp(opts) {
17356
+ if (opts.all) return HELP_TEXT;
17357
+ const replacement = renderCommandsSection(false);
17358
+ return HELP_TEXT.replace(COMMANDS_BLOCK_RE, `COMMANDS:
17359
+ ${replacement}
17360
+
17361
+ OPTIONS:`);
17362
+ }
17297
17363
 
17298
17364
  // src/cli-types.ts
17299
17365
  var EXIT_CODES = {
@@ -17322,6 +17388,11 @@ var PARSE_ARGS_CONFIG = {
17322
17388
  type: "boolean",
17323
17389
  default: false
17324
17390
  },
17391
+ // Tiered --help output (Issue #2135): `--help --all` unhides maintainer commands
17392
+ all: {
17393
+ type: "boolean",
17394
+ default: false
17395
+ },
17325
17396
  mode: {
17326
17397
  type: "string",
17327
17398
  short: "m",
@@ -22614,8 +22685,9 @@ async function handleValidateCommand(args) {
22614
22685
  }
22615
22686
 
22616
22687
  // src/cli-commands.ts
22617
- function printHelp() {
22618
- process.stdout.write(HELP_TEXT + "\n");
22688
+ function printHelp(args) {
22689
+ const all = args?.options.all ?? false;
22690
+ process.stdout.write(renderHelp({ all }) + "\n");
22619
22691
  }
22620
22692
  function printVersion() {
22621
22693
  process.stdout.write(`nexus-agents v${VERSION}
@@ -22652,7 +22724,7 @@ var SYNC_COMMAND_HANDLERS = {
22652
22724
  };
22653
22725
  function handleSyncCommand(args) {
22654
22726
  if (args.command === "help") {
22655
- printHelp();
22727
+ printHelp(args);
22656
22728
  process.exit(EXIT_CODES.SUCCESS);
22657
22729
  }
22658
22730
  if (args.command === "version") {
@@ -23067,6 +23139,7 @@ function buildOptions(values) {
23067
23139
  version: values.version,
23068
23140
  verbose: values.verbose,
23069
23141
  interactive: values.interactive,
23142
+ all: values.all,
23070
23143
  mode: detectionResult.mode,
23071
23144
  force: values.force,
23072
23145
  format: values.format,