nexus-agents 2.150.2 → 2.150.4

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.
@@ -18,7 +18,7 @@ import {
18
18
  DEFAULT_TASK_TTL_MS,
19
19
  DEFAULT_TOOL_RATE_LIMITS,
20
20
  clampTaskTtl
21
- } from "./chunk-BNQZKW3S.js";
21
+ } from "./chunk-UIUTDHRX.js";
22
22
  import {
23
23
  executeExpert
24
24
  } from "./chunk-JYHSZDKL.js";
@@ -41,7 +41,7 @@ import {
41
41
  toJobSummary,
42
42
  warnIfSimulatedOutsideTests,
43
43
  writeJobCancelled
44
- } from "./chunk-SF3AM3SY.js";
44
+ } from "./chunk-CB234Y3O.js";
45
45
  import {
46
46
  normalizeTopicToCanonical,
47
47
  synthesizeResearch
@@ -43446,7 +43446,7 @@ ${contextBlock}`;
43446
43446
  const strategy = config.votingStrategy ?? "higher_order";
43447
43447
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43448
43448
  try {
43449
- const { executeVoting } = await import("./consensus-vote-3R7MNO26.js");
43449
+ const { executeVoting } = await import("./consensus-vote-7R6RNZXS.js");
43450
43450
  const votingResult = await executeVoting(
43451
43451
  {
43452
43452
  proposal: buildVoteProposal(plan, research),
@@ -51228,4 +51228,4 @@ export {
51228
51228
  shutdownFeedbackSubscriber,
51229
51229
  createEventBusBridge
51230
51230
  };
51231
- //# sourceMappingURL=chunk-MDD3HOMI.js.map
51231
+ //# sourceMappingURL=chunk-GTG2XFAS.js.map
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-DHVMSIT5.js";
43
43
 
44
44
  // src/version.ts
45
- var VERSION = true ? "2.150.2" : "dev";
45
+ var VERSION = true ? "2.150.4" : "dev";
46
46
 
47
47
  // src/config/schemas-core.ts
48
48
  import { z } from "zod";
@@ -2132,7 +2132,7 @@ async function runDoctorFix(result) {
2132
2132
  writeLine2("\u2500".repeat(40));
2133
2133
  let fixCount = 0;
2134
2134
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2135
- const { runSetup } = await import("./setup-command-YJ7PCU54.js");
2135
+ const { runSetup } = await import("./setup-command-OL2A2GCI.js");
2136
2136
  const setupResult = runSetup({
2137
2137
  skipMcp: true,
2138
2138
  skipRules: true,
@@ -2245,4 +2245,4 @@ export {
2245
2245
  startStdioServer,
2246
2246
  closeServer
2247
2247
  };
2248
- //# sourceMappingURL=chunk-BNQZKW3S.js.map
2248
+ //# sourceMappingURL=chunk-UIUTDHRX.js.map
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import "./chunk-M4YN3U3P.js";
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-2ZUXJTIA.js";
25
+ } from "./chunk-4ELTYI33.js";
26
26
  import "./chunk-CD7FU55Z.js";
27
27
  import {
28
28
  AuthHandler,
@@ -142,7 +142,7 @@ import {
142
142
  validateCommand,
143
143
  validateWorkflow,
144
144
  wrapInMarkdownFence
145
- } from "./chunk-MDD3HOMI.js";
145
+ } from "./chunk-GTG2XFAS.js";
146
146
  import "./chunk-CMAQI2SJ.js";
147
147
  import "./chunk-T2SGTVB4.js";
148
148
  import "./chunk-HFOQKCD2.js";
@@ -170,7 +170,7 @@ import {
170
170
  loadConfig,
171
171
  runDoctor,
172
172
  validateNexusEnv
173
- } from "./chunk-BNQZKW3S.js";
173
+ } from "./chunk-UIUTDHRX.js";
174
174
  import "./chunk-GMQH2I4P.js";
175
175
  import {
176
176
  shutdownExpertBridge
@@ -183,7 +183,7 @@ import {
183
183
  VoteThresholdSchema,
184
184
  executeVoting,
185
185
  registerConsensusVoteTool
186
- } from "./chunk-SF3AM3SY.js";
186
+ } from "./chunk-CB234Y3O.js";
187
187
  import {
188
188
  loadUsageEvents,
189
189
  rollupByModel
@@ -20411,7 +20411,258 @@ function parsePositiveInt(arg, defaultVal) {
20411
20411
  return Number.isNaN(parsed) || parsed <= 0 ? defaultVal : parsed;
20412
20412
  }
20413
20413
 
20414
+ // src/cli-command-help.ts
20415
+ var ORCHESTRATE_HELP = {
20416
+ command: "orchestrate",
20417
+ examples: [
20418
+ 'nexus-agents orchestrate "Explain this function"',
20419
+ 'nexus-agents orchestrate "Generate unit tests" --model=claude',
20420
+ 'nexus-agents orchestrate "Refactor code" --format=json --dry-run',
20421
+ 'nexus-agents orchestrate "Build feature" --engine=puppeteer --max-tokens=50000'
20422
+ ],
20423
+ flags: [
20424
+ {
20425
+ flag: "--engine=<name>",
20426
+ description: "Execution engine: router, puppeteer",
20427
+ defaultValue: "router"
20428
+ },
20429
+ { flag: "--model=<cli>", description: "Target CLI: claude, gemini, codex, opencode" },
20430
+ { flag: "--max-tokens=<n>", description: "Maximum token budget", defaultValue: "100000" },
20431
+ { flag: "--max-cost-usd=<n>", description: "Maximum cost budget in USD", defaultValue: "10" },
20432
+ { flag: "--format=<fmt>", description: "Output format: text, json", defaultValue: "text" },
20433
+ { flag: "--dry-run", description: "Show routing decision without executing" }
20434
+ ],
20435
+ requiresApiKey: ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_AI_API_KEY"]
20436
+ };
20437
+ var VOTE_HELP = {
20438
+ command: "vote",
20439
+ examples: [
20440
+ 'nexus-agents vote --proposal "Add caching layer"',
20441
+ 'nexus-agents vote -p "Migrate to PostgreSQL" -t supermajority',
20442
+ 'nexus-agents vote -p "Quick decision" --quick',
20443
+ 'nexus-agents vote -p "Test idea" --dry-run'
20444
+ ],
20445
+ flags: [
20446
+ { flag: "-p, --proposal <text>", description: "Proposal text to vote on (required)" },
20447
+ { flag: "-t, --threshold <t>", description: "Threshold: majority, supermajority, unanimous" },
20448
+ { flag: "--quick", description: "Use 3 agents instead of the full 7 for faster votes" },
20449
+ { flag: "--dry-run", description: "Simulate votes without agent execution" },
20450
+ { flag: "--timeout=<seconds>", description: "Timeout per vote in seconds", defaultValue: "90" },
20451
+ {
20452
+ flag: "--error-policy <p>",
20453
+ description: "How to count errored/timed-out voters: reduce_denominator | count_as_abstain | fail_closed (default: fail_closed for unanimous, reduce_denominator otherwise)"
20454
+ },
20455
+ { flag: "--verbose", description: "Show vote verification hashes" }
20456
+ ],
20457
+ requiresApiKey: ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_AI_API_KEY"]
20458
+ };
20459
+ var EXPERT_HELP = {
20460
+ command: "expert",
20461
+ examples: ["nexus-agents expert list", "nexus-agents expert list --format=json"],
20462
+ flags: [
20463
+ {
20464
+ flag: "--format=<fmt>",
20465
+ description: "Output format: table, json, yaml",
20466
+ defaultValue: "table"
20467
+ }
20468
+ ]
20469
+ };
20470
+ var WORKFLOW_HELP = {
20471
+ command: "workflow",
20472
+ examples: [
20473
+ "nexus-agents workflow list",
20474
+ `nexus-agents workflow run code-review --input='{"url":"https://github.com/o/r/pull/1"}'`,
20475
+ "nexus-agents workflow run code-review --dry-run"
20476
+ ],
20477
+ flags: [
20478
+ { flag: "-i, --input <json>", description: "Workflow inputs as JSON string or file path" },
20479
+ { flag: "--dry-run", description: "Validate workflow without executing" }
20480
+ ]
20481
+ };
20482
+ var DOCTOR_HELP = {
20483
+ command: "doctor",
20484
+ examples: ["nexus-agents doctor", "nexus-agents doctor --deep", "nexus-agents doctor --fix"],
20485
+ flags: [
20486
+ { flag: "--deep", description: "Run deep health checks (adapter connectivity)" },
20487
+ { flag: "--fix", description: "Auto-fix correctable issues (data dirs, config)" },
20488
+ { flag: "--verbose", description: "Show detailed check output" }
20489
+ ]
20490
+ };
20491
+ var MODE_HELP = {
20492
+ command: "mode",
20493
+ examples: [
20494
+ "nexus-agents mode",
20495
+ "nexus-agents mode --format=json",
20496
+ "nexus-agents mode --mode=mesh"
20497
+ ],
20498
+ flags: [
20499
+ { flag: "--format=<fmt>", description: "Output format: text, json", defaultValue: "text" },
20500
+ {
20501
+ flag: "--mode=<m>",
20502
+ description: "Report what an explicit override would resolve to: server, orchestrator, mesh"
20503
+ }
20504
+ ]
20505
+ };
20506
+ var SETUP_HELP = {
20507
+ command: "setup",
20508
+ examples: [
20509
+ "nexus-agents setup",
20510
+ "nexus-agents setup --interactive",
20511
+ "nexus-agents setup --skip-mcp --skip-hooks",
20512
+ "nexus-agents setup --scope=project --dry-run"
20513
+ ],
20514
+ flags: [
20515
+ { flag: "--interactive", description: "Run guided setup wizard with prompts" },
20516
+ { flag: "--non-interactive", description: "Skip prompts (for CI/automation)" },
20517
+ { flag: "--force", description: "Overwrite existing configuration files" },
20518
+ { flag: "--skip-mcp", description: "Skip MCP configuration" },
20519
+ { flag: "--skip-config", description: "Skip config file generation" },
20520
+ { flag: "--skip-rules", description: "Skip .rules generation" },
20521
+ { flag: "--skip-hooks", description: "Skip hook configuration" },
20522
+ { flag: "--skip-opencode", description: "Skip OpenCode MCP setup" },
20523
+ { flag: "--skip-gemini", description: "Skip Gemini MCP setup" },
20524
+ { flag: "--skip-codex", description: "Skip Codex MCP setup" },
20525
+ {
20526
+ flag: "--scope=<scope>",
20527
+ description: "MCP config scope: user, project",
20528
+ defaultValue: "user"
20529
+ },
20530
+ { flag: "--dry-run", description: "Show changes without applying them" },
20531
+ {
20532
+ flag: "--custom-api <url>",
20533
+ description: "Configure OpenAI-compatible gateway (short-circuits normal setup; validates URL + probes /models) [#2124]"
20534
+ },
20535
+ { flag: "--custom-api-key <key>", description: "API key for --custom-api (else prompt/env)" },
20536
+ {
20537
+ flag: "--custom-model <id>",
20538
+ description: "Default model for --custom-api (default: gpt-4o)"
20539
+ }
20540
+ ]
20541
+ };
20542
+ var CONFIG_HELP = {
20543
+ command: "config",
20544
+ examples: [
20545
+ "nexus-agents config init",
20546
+ "nexus-agents config get TIMEOUT_DEFAULTS.cliMs",
20547
+ "nexus-agents config set TIMEOUT_DEFAULTS.cliMs 90000",
20548
+ "nexus-agents config list",
20549
+ "nexus-agents config export ./config.json",
20550
+ "nexus-agents config import ./config.yaml"
20551
+ ],
20552
+ flags: [
20553
+ {
20554
+ flag: "-o, --output <path>",
20555
+ description: "Output path for config init",
20556
+ defaultValue: "./nexus-agents.yaml"
20557
+ },
20558
+ { flag: "-f, --force", description: "Overwrite existing configuration file" }
20559
+ ]
20560
+ };
20561
+ var RESEARCH_HELP = {
20562
+ command: "research",
20563
+ examples: [
20564
+ "nexus-agents research status",
20565
+ "nexus-agents research stats --format=json",
20566
+ "nexus-agents research add 2401.12345",
20567
+ "nexus-agents research refresh",
20568
+ "nexus-agents research check"
20569
+ ],
20570
+ flags: [
20571
+ { flag: "--format=<fmt>", description: "Output format: table, json", defaultValue: "table" },
20572
+ { flag: "-o, --output=<path>", description: "Custom output path for refresh" }
20573
+ ]
20574
+ };
20575
+ var FITNESS_AUDIT_HELP = {
20576
+ command: "fitness-audit",
20577
+ examples: [
20578
+ "nexus-agents fitness-audit",
20579
+ "nexus-agents fitness-audit --format=json",
20580
+ "nexus-agents fitness-audit --min-severity=warning"
20581
+ ],
20582
+ flags: [
20583
+ { flag: "--format=<fmt>", description: "Output format: json, text", defaultValue: "text" },
20584
+ {
20585
+ flag: "--min-severity=<sev>",
20586
+ description: "Filter: info, warning, critical",
20587
+ defaultValue: "all"
20588
+ }
20589
+ ]
20590
+ };
20591
+ var REVIEW_HELP = {
20592
+ command: "review",
20593
+ examples: [
20594
+ "nexus-agents review https://github.com/owner/repo/pull/123",
20595
+ "nexus-agents review owner/repo#123 --dry-run",
20596
+ "nexus-agents review --setup"
20597
+ ],
20598
+ flags: [
20599
+ { flag: "--setup", description: "Run review setup wizard" },
20600
+ { flag: "--dry-run", description: "Review without posting to GitHub" },
20601
+ { flag: "--skip-checks", description: "Skip pre-flight validation" }
20602
+ ]
20603
+ };
20604
+ var COMMAND_HELP = [
20605
+ ORCHESTRATE_HELP,
20606
+ VOTE_HELP,
20607
+ EXPERT_HELP,
20608
+ WORKFLOW_HELP,
20609
+ DOCTOR_HELP,
20610
+ MODE_HELP,
20611
+ SETUP_HELP,
20612
+ CONFIG_HELP,
20613
+ RESEARCH_HELP,
20614
+ FITNESS_AUDIT_HELP,
20615
+ REVIEW_HELP
20616
+ ];
20617
+ function formatFlag(entry) {
20618
+ const defaultSuffix = entry.defaultValue !== void 0 ? ` (default: ${entry.defaultValue})` : "";
20619
+ return ` ${entry.flag.padEnd(28)} ${entry.description}${defaultSuffix}`;
20620
+ }
20621
+ function describe(command) {
20622
+ return getCommandDescription(command) ?? "";
20623
+ }
20624
+ function getCommandHelp(command) {
20625
+ return COMMAND_HELP.find((e) => e.command === command);
20626
+ }
20627
+ function formatCommandHelp(command) {
20628
+ const entry = getCommandHelp(command);
20629
+ if (entry === void 0) return void 0;
20630
+ const lines = [];
20631
+ lines.push(`nexus-agents ${entry.command} -- ${describe(entry.command)}`);
20632
+ lines.push("");
20633
+ if (entry.flags !== void 0 && entry.flags.length > 0) {
20634
+ lines.push("FLAGS:");
20635
+ for (const flag of entry.flags) {
20636
+ lines.push(formatFlag(flag));
20637
+ }
20638
+ lines.push("");
20639
+ }
20640
+ if (entry.requiresApiKey !== void 0 && entry.requiresApiKey.length > 0) {
20641
+ lines.push(`REQUIRES: ${entry.requiresApiKey.join(", ")} (at least one)`);
20642
+ lines.push("");
20643
+ }
20644
+ lines.push("EXAMPLES:");
20645
+ for (const example of entry.examples) {
20646
+ lines.push(` ${example}`);
20647
+ }
20648
+ return lines.join("\n");
20649
+ }
20650
+
20414
20651
  // src/cli-commands-usage.ts
20652
+ function printUsageWithExamples(opts) {
20653
+ process.stdout.write(`Error: ${opts.error}
20654
+ `);
20655
+ process.stdout.write(`Usage: ${opts.usage}
20656
+ `);
20657
+ const examples = getCommandHelp(opts.command)?.examples ?? [];
20658
+ if (examples.length > 0) {
20659
+ process.stdout.write("Examples:\n");
20660
+ for (const example of examples) {
20661
+ process.stdout.write(` ${example}
20662
+ `);
20663
+ }
20664
+ }
20665
+ }
20415
20666
  function printWorkflowRunUsage() {
20416
20667
  process.stdout.write("Error: Workflow name is required.\n");
20417
20668
  process.stdout.write("Usage: nexus-agents workflow run <name> [options]\n");
@@ -20425,20 +20676,18 @@ function printRoutingAuditUsage() {
20425
20676
  process.stdout.write(' nexus-agents routing-audit "Generate tests" --format=json\n');
20426
20677
  }
20427
20678
  function printOrchestrateUsage() {
20428
- process.stdout.write("Error: Task description is required.\n");
20429
- process.stdout.write("Usage: nexus-agents orchestrate <task> [options]\n");
20430
- process.stdout.write("Examples:\n");
20431
- process.stdout.write(' nexus-agents orchestrate "Explain this function"\n');
20432
- process.stdout.write(' nexus-agents orchestrate "Generate tests" --model=claude\n');
20433
- process.stdout.write(' nexus-agents orchestrate "Refactor code" --dry-run\n');
20679
+ printUsageWithExamples({
20680
+ error: "Task description is required.",
20681
+ usage: "nexus-agents orchestrate <task> [options]",
20682
+ command: "orchestrate"
20683
+ });
20434
20684
  }
20435
20685
  function printVoteUsage() {
20436
- process.stdout.write("Error: Proposal is required.\n");
20437
- process.stdout.write('Usage: nexus-agents vote --proposal "..." [options]\n');
20438
- process.stdout.write("Examples:\n");
20439
- process.stdout.write(' nexus-agents vote --proposal "Add feature X"\n');
20440
- process.stdout.write(' nexus-agents vote -p "Proposal" -t supermajority\n');
20441
- process.stdout.write(' nexus-agents vote -p "Quick decision" --quick\n');
20686
+ printUsageWithExamples({
20687
+ error: "Proposal is required.",
20688
+ usage: 'nexus-agents vote --proposal "..." [options]',
20689
+ command: "vote"
20690
+ });
20442
20691
  }
20443
20692
  function printIndexUsage() {
20444
20693
  process.stdout.write("Error: Index subcommand is required.\n");
@@ -25327,240 +25576,6 @@ async function dispatchCommand(args) {
25327
25576
  }
25328
25577
  }
25329
25578
 
25330
- // src/cli-command-help.ts
25331
- var ORCHESTRATE_HELP = {
25332
- command: "orchestrate",
25333
- examples: [
25334
- 'nexus-agents orchestrate "Explain this function"',
25335
- 'nexus-agents orchestrate "Generate unit tests" --model=claude',
25336
- 'nexus-agents orchestrate "Refactor code" --format=json --dry-run',
25337
- 'nexus-agents orchestrate "Build feature" --engine=puppeteer --max-tokens=50000'
25338
- ],
25339
- flags: [
25340
- {
25341
- flag: "--engine=<name>",
25342
- description: "Execution engine: router, puppeteer",
25343
- defaultValue: "router"
25344
- },
25345
- { flag: "--model=<cli>", description: "Target CLI: claude, gemini, codex, opencode" },
25346
- { flag: "--max-tokens=<n>", description: "Maximum token budget", defaultValue: "100000" },
25347
- { flag: "--max-cost-usd=<n>", description: "Maximum cost budget in USD", defaultValue: "10" },
25348
- { flag: "--format=<fmt>", description: "Output format: text, json", defaultValue: "text" },
25349
- { flag: "--dry-run", description: "Show routing decision without executing" }
25350
- ],
25351
- requiresApiKey: ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_AI_API_KEY"]
25352
- };
25353
- var VOTE_HELP = {
25354
- command: "vote",
25355
- examples: [
25356
- 'nexus-agents vote --proposal "Add caching layer"',
25357
- 'nexus-agents vote -p "Migrate to PostgreSQL" -t supermajority',
25358
- 'nexus-agents vote -p "Quick decision" --quick',
25359
- 'nexus-agents vote -p "Test idea" --dry-run'
25360
- ],
25361
- flags: [
25362
- { flag: "-p, --proposal <text>", description: "Proposal text to vote on (required)" },
25363
- { flag: "-t, --threshold <t>", description: "Threshold: majority, supermajority, unanimous" },
25364
- { flag: "--quick", description: "Use 3 agents instead of the full 7 for faster votes" },
25365
- { flag: "--dry-run", description: "Simulate votes without agent execution" },
25366
- { flag: "--timeout=<seconds>", description: "Timeout per vote in seconds", defaultValue: "90" },
25367
- {
25368
- flag: "--error-policy <p>",
25369
- description: "How to count errored/timed-out voters: reduce_denominator | count_as_abstain | fail_closed (default: fail_closed for unanimous, reduce_denominator otherwise)"
25370
- },
25371
- { flag: "--verbose", description: "Show vote verification hashes" }
25372
- ],
25373
- requiresApiKey: ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_AI_API_KEY"]
25374
- };
25375
- var EXPERT_HELP = {
25376
- command: "expert",
25377
- examples: ["nexus-agents expert list", "nexus-agents expert list --format=json"],
25378
- flags: [
25379
- {
25380
- flag: "--format=<fmt>",
25381
- description: "Output format: table, json, yaml",
25382
- defaultValue: "table"
25383
- }
25384
- ]
25385
- };
25386
- var WORKFLOW_HELP = {
25387
- command: "workflow",
25388
- examples: [
25389
- "nexus-agents workflow list",
25390
- `nexus-agents workflow run code-review --input='{"url":"https://github.com/o/r/pull/1"}'`,
25391
- "nexus-agents workflow run code-review --dry-run"
25392
- ],
25393
- flags: [
25394
- { flag: "-i, --input <json>", description: "Workflow inputs as JSON string or file path" },
25395
- { flag: "--dry-run", description: "Validate workflow without executing" }
25396
- ]
25397
- };
25398
- var DOCTOR_HELP = {
25399
- command: "doctor",
25400
- examples: ["nexus-agents doctor", "nexus-agents doctor --deep", "nexus-agents doctor --fix"],
25401
- flags: [
25402
- { flag: "--deep", description: "Run deep health checks (adapter connectivity)" },
25403
- { flag: "--fix", description: "Auto-fix correctable issues (data dirs, config)" },
25404
- { flag: "--verbose", description: "Show detailed check output" }
25405
- ]
25406
- };
25407
- var MODE_HELP = {
25408
- command: "mode",
25409
- examples: [
25410
- "nexus-agents mode",
25411
- "nexus-agents mode --format=json",
25412
- "nexus-agents mode --mode=mesh"
25413
- ],
25414
- flags: [
25415
- { flag: "--format=<fmt>", description: "Output format: text, json", defaultValue: "text" },
25416
- {
25417
- flag: "--mode=<m>",
25418
- description: "Report what an explicit override would resolve to: server, orchestrator, mesh"
25419
- }
25420
- ]
25421
- };
25422
- var SETUP_HELP = {
25423
- command: "setup",
25424
- examples: [
25425
- "nexus-agents setup",
25426
- "nexus-agents setup --interactive",
25427
- "nexus-agents setup --skip-mcp --skip-hooks",
25428
- "nexus-agents setup --scope=project --dry-run"
25429
- ],
25430
- flags: [
25431
- { flag: "--interactive", description: "Run guided setup wizard with prompts" },
25432
- { flag: "--non-interactive", description: "Skip prompts (for CI/automation)" },
25433
- { flag: "--force", description: "Overwrite existing configuration files" },
25434
- { flag: "--skip-mcp", description: "Skip MCP configuration" },
25435
- { flag: "--skip-config", description: "Skip config file generation" },
25436
- { flag: "--skip-rules", description: "Skip .rules generation" },
25437
- { flag: "--skip-hooks", description: "Skip hook configuration" },
25438
- { flag: "--skip-opencode", description: "Skip OpenCode MCP setup" },
25439
- { flag: "--skip-gemini", description: "Skip Gemini MCP setup" },
25440
- { flag: "--skip-codex", description: "Skip Codex MCP setup" },
25441
- {
25442
- flag: "--scope=<scope>",
25443
- description: "MCP config scope: user, project",
25444
- defaultValue: "user"
25445
- },
25446
- { flag: "--dry-run", description: "Show changes without applying them" },
25447
- {
25448
- flag: "--custom-api <url>",
25449
- description: "Configure OpenAI-compatible gateway (short-circuits normal setup; validates URL + probes /models) [#2124]"
25450
- },
25451
- { flag: "--custom-api-key <key>", description: "API key for --custom-api (else prompt/env)" },
25452
- {
25453
- flag: "--custom-model <id>",
25454
- description: "Default model for --custom-api (default: gpt-4o)"
25455
- }
25456
- ]
25457
- };
25458
- var CONFIG_HELP = {
25459
- command: "config",
25460
- examples: [
25461
- "nexus-agents config init",
25462
- "nexus-agents config get TIMEOUT_DEFAULTS.cliMs",
25463
- "nexus-agents config set TIMEOUT_DEFAULTS.cliMs 90000",
25464
- "nexus-agents config list",
25465
- "nexus-agents config export ./config.json",
25466
- "nexus-agents config import ./config.yaml"
25467
- ],
25468
- flags: [
25469
- {
25470
- flag: "-o, --output <path>",
25471
- description: "Output path for config init",
25472
- defaultValue: "./nexus-agents.yaml"
25473
- },
25474
- { flag: "-f, --force", description: "Overwrite existing configuration file" }
25475
- ]
25476
- };
25477
- var RESEARCH_HELP = {
25478
- command: "research",
25479
- examples: [
25480
- "nexus-agents research status",
25481
- "nexus-agents research stats --format=json",
25482
- "nexus-agents research add 2401.12345",
25483
- "nexus-agents research refresh",
25484
- "nexus-agents research check"
25485
- ],
25486
- flags: [
25487
- { flag: "--format=<fmt>", description: "Output format: table, json", defaultValue: "table" },
25488
- { flag: "-o, --output=<path>", description: "Custom output path for refresh" }
25489
- ]
25490
- };
25491
- var FITNESS_AUDIT_HELP = {
25492
- command: "fitness-audit",
25493
- examples: [
25494
- "nexus-agents fitness-audit",
25495
- "nexus-agents fitness-audit --format=json",
25496
- "nexus-agents fitness-audit --min-severity=warning"
25497
- ],
25498
- flags: [
25499
- { flag: "--format=<fmt>", description: "Output format: json, text", defaultValue: "text" },
25500
- {
25501
- flag: "--min-severity=<sev>",
25502
- description: "Filter: info, warning, critical",
25503
- defaultValue: "all"
25504
- }
25505
- ]
25506
- };
25507
- var REVIEW_HELP = {
25508
- command: "review",
25509
- examples: [
25510
- "nexus-agents review https://github.com/owner/repo/pull/123",
25511
- "nexus-agents review owner/repo#123 --dry-run",
25512
- "nexus-agents review --setup"
25513
- ],
25514
- flags: [
25515
- { flag: "--setup", description: "Run review setup wizard" },
25516
- { flag: "--dry-run", description: "Review without posting to GitHub" },
25517
- { flag: "--skip-checks", description: "Skip pre-flight validation" }
25518
- ]
25519
- };
25520
- var COMMAND_HELP = [
25521
- ORCHESTRATE_HELP,
25522
- VOTE_HELP,
25523
- EXPERT_HELP,
25524
- WORKFLOW_HELP,
25525
- DOCTOR_HELP,
25526
- MODE_HELP,
25527
- SETUP_HELP,
25528
- CONFIG_HELP,
25529
- RESEARCH_HELP,
25530
- FITNESS_AUDIT_HELP,
25531
- REVIEW_HELP
25532
- ];
25533
- function formatFlag(entry) {
25534
- const defaultSuffix = entry.defaultValue !== void 0 ? ` (default: ${entry.defaultValue})` : "";
25535
- return ` ${entry.flag.padEnd(28)} ${entry.description}${defaultSuffix}`;
25536
- }
25537
- function describe(command) {
25538
- return getCommandDescription(command) ?? "";
25539
- }
25540
- function formatCommandHelp(command) {
25541
- const entry = COMMAND_HELP.find((e) => e.command === command);
25542
- if (entry === void 0) return void 0;
25543
- const lines = [];
25544
- lines.push(`nexus-agents ${entry.command} -- ${describe(entry.command)}`);
25545
- lines.push("");
25546
- if (entry.flags !== void 0 && entry.flags.length > 0) {
25547
- lines.push("FLAGS:");
25548
- for (const flag of entry.flags) {
25549
- lines.push(formatFlag(flag));
25550
- }
25551
- lines.push("");
25552
- }
25553
- if (entry.requiresApiKey !== void 0 && entry.requiresApiKey.length > 0) {
25554
- lines.push(`REQUIRES: ${entry.requiresApiKey.join(", ")} (at least one)`);
25555
- lines.push("");
25556
- }
25557
- lines.push("EXAMPLES:");
25558
- for (const example of entry.examples) {
25559
- lines.push(` ${example}`);
25560
- }
25561
- return lines.join("\n");
25562
- }
25563
-
25564
25579
  // src/cli-command-suggester.ts
25565
25580
  var MAX_SUGGESTIONS = 3;
25566
25581
  var MAX_ABSOLUTE_DISTANCE = 2;