nexus-agents 2.55.0 → 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/{chunk-HQ43NDJW.js → chunk-BPMQRYGU.js} +6 -109
- package/dist/chunk-BPMQRYGU.js.map +1 -0
- package/dist/chunk-C3FGEDD7.js +2520 -0
- package/dist/chunk-C3FGEDD7.js.map +1 -0
- package/dist/{chunk-KTJIEY77.js → chunk-EJLWDYK7.js} +1985 -3653
- package/dist/chunk-EJLWDYK7.js.map +1 -0
- package/dist/{chunk-JEKPVSC4.js → chunk-KGMC6F5D.js} +357 -13
- package/dist/chunk-KGMC6F5D.js.map +1 -0
- package/dist/chunk-NUBSJGQZ.js +14 -0
- package/dist/chunk-NUBSJGQZ.js.map +1 -0
- package/dist/{chunk-JERFBN73.js → chunk-PCMWLXT4.js} +6 -16
- package/dist/chunk-PCMWLXT4.js.map +1 -0
- package/dist/chunk-R66AWJJ7.js +120 -0
- package/dist/chunk-R66AWJJ7.js.map +1 -0
- package/dist/cli.d.ts +9 -1
- package/dist/cli.js +337 -213
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-NRPXA57O.js → consensus-vote-G6H532ME.js} +3 -2
- package/dist/index.js +35 -32
- package/dist/index.js.map +1 -1
- package/dist/{research-helpers-synthesize-TFZIXBX3.js → research-helpers-synthesize-E6WQLQKP.js} +3 -2
- package/dist/{setup-command-NGAJEWE4.js → setup-command-AV4MODEL.js} +5 -3
- package/dist/setup-custom-api-XAWKRDWV.js +107 -0
- package/dist/setup-custom-api-XAWKRDWV.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-HQ43NDJW.js.map +0 -1
- package/dist/chunk-JEKPVSC4.js.map +0 -1
- package/dist/chunk-JERFBN73.js.map +0 -1
- package/dist/chunk-KTJIEY77.js.map +0 -1
- package/dist/chunk-SY344FS5.js +0 -839
- package/dist/chunk-SY344FS5.js.map +0 -1
- /package/dist/{consensus-vote-NRPXA57O.js.map → consensus-vote-G6H532ME.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-TFZIXBX3.js.map → research-helpers-synthesize-E6WQLQKP.js.map} +0 -0
- /package/dist/{setup-command-NGAJEWE4.js.map → setup-command-AV4MODEL.js.map} +0 -0
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
|
-
|
|
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-
|
|
144
|
+
} from "./chunk-EJLWDYK7.js";
|
|
155
145
|
import {
|
|
156
146
|
resolveToken
|
|
157
147
|
} from "./chunk-2SPRLBOS.js";
|
|
@@ -170,13 +160,14 @@ import {
|
|
|
170
160
|
registerConsensusVoteTool,
|
|
171
161
|
shutdownToolMemory,
|
|
172
162
|
validateTimeout
|
|
173
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-BPMQRYGU.js";
|
|
164
|
+
import "./chunk-R66AWJJ7.js";
|
|
174
165
|
import {
|
|
175
166
|
loadPapersRegistry,
|
|
176
167
|
loadTechniquesRegistry,
|
|
177
168
|
savePapersRegistry,
|
|
178
169
|
synthesizeResearch
|
|
179
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-PCMWLXT4.js";
|
|
180
171
|
import {
|
|
181
172
|
classifyTrust,
|
|
182
173
|
createFullGitHubProvider,
|
|
@@ -191,17 +182,26 @@ import "./chunk-AP2FD37C.js";
|
|
|
191
182
|
import "./chunk-BQ4YXGGQ.js";
|
|
192
183
|
import "./chunk-ED6VQWNG.js";
|
|
193
184
|
import {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
185
|
+
CustomExpertDefinitionSchema,
|
|
186
|
+
DEFAULTS,
|
|
187
|
+
MAX_SYSTEM_PROMPT_LENGTH,
|
|
188
|
+
VALID_EXPERT_DOMAINS,
|
|
189
|
+
VALID_EXPERT_TIERS,
|
|
197
190
|
VERSION,
|
|
191
|
+
adaptRoutingConfig,
|
|
198
192
|
closeServer,
|
|
199
193
|
connectTransport,
|
|
200
194
|
createServer,
|
|
201
195
|
doctorCommand,
|
|
196
|
+
getConfig,
|
|
197
|
+
getConfigManager,
|
|
202
198
|
initDataDirectories,
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
loadConfig,
|
|
200
|
+
runDoctor,
|
|
201
|
+
validateNexusEnv
|
|
202
|
+
} from "./chunk-C3FGEDD7.js";
|
|
203
|
+
import "./chunk-NUBSJGQZ.js";
|
|
204
|
+
import "./chunk-GJVHRJO2.js";
|
|
205
205
|
import "./chunk-NYNBDP7M.js";
|
|
206
206
|
import {
|
|
207
207
|
MemoryError
|
|
@@ -9388,21 +9388,22 @@ function getCommandOptions(name, cliOptions) {
|
|
|
9388
9388
|
}
|
|
9389
9389
|
return cmdOptions;
|
|
9390
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
|
+
}
|
|
9391
9401
|
function extractCliCommands(project, packageRoot, cliCommandsPath, cliTypesPath) {
|
|
9392
9402
|
const commands = [];
|
|
9393
9403
|
const typesFullPath = path12.join(packageRoot, cliTypesPath);
|
|
9394
9404
|
const typesFile = project.getSourceFile(typesFullPath);
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
if (typesFile !== void 0) {
|
|
9398
|
-
const helpTextVar = typesFile.getVariableDeclaration("HELP_TEXT");
|
|
9399
|
-
if (helpTextVar !== void 0) {
|
|
9400
|
-
const helpText = helpTextVar.getInitializer()?.getText() ?? "";
|
|
9401
|
-
const cleanText = helpText.slice(1, -1).replace(/^\s*\n/, "").replace(/\n\s*$/, "");
|
|
9402
|
-
helpTextCommands = parseHelpTextCommands(cleanText);
|
|
9403
|
-
}
|
|
9404
|
-
cliOptions = extractCliOptions(typesFile);
|
|
9405
|
-
}
|
|
9405
|
+
const helpTextCommands = loadHelpTextCommands(project, packageRoot, typesFile);
|
|
9406
|
+
const cliOptions = typesFile !== void 0 ? extractCliOptions(typesFile) : /* @__PURE__ */ new Map();
|
|
9406
9407
|
const commandsFullPath = path12.join(packageRoot, cliCommandsPath);
|
|
9407
9408
|
const commandsFile = project.getSourceFile(commandsFullPath);
|
|
9408
9409
|
if (commandsFile === void 0) return commands;
|
|
@@ -9498,7 +9499,11 @@ function extractToolsFromFile(sourceFile, relativePath) {
|
|
|
9498
9499
|
if (args.length < 2) continue;
|
|
9499
9500
|
const nameArg = args[0];
|
|
9500
9501
|
if (nameArg === void 0) continue;
|
|
9501
|
-
const
|
|
9502
|
+
const nameKind = nameArg.getKind();
|
|
9503
|
+
if (nameKind !== SyntaxKind2.StringLiteral && nameKind !== SyntaxKind2.NoSubstitutionTemplateLiteral) {
|
|
9504
|
+
continue;
|
|
9505
|
+
}
|
|
9506
|
+
const toolName = nameArg.getText().replace(/['"`]/g, "");
|
|
9502
9507
|
const { description, schemaArg } = extractToolMeta(callText, args, sourceFile);
|
|
9503
9508
|
let parameters = [];
|
|
9504
9509
|
if (schemaArg !== void 0) {
|
|
@@ -9590,6 +9595,11 @@ function createProject(opts) {
|
|
|
9590
9595
|
project.addSourceFilesAtPaths([
|
|
9591
9596
|
path14.join(opts.packageRoot, opts.cliCommandsPath),
|
|
9592
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"),
|
|
9593
9603
|
path14.join(opts.packageRoot, opts.mcpToolsPath, "*.ts")
|
|
9594
9604
|
]);
|
|
9595
9605
|
return project;
|
|
@@ -10408,182 +10418,6 @@ function parseValidationArgs(positionals, format, verbose) {
|
|
|
10408
10418
|
return options;
|
|
10409
10419
|
}
|
|
10410
10420
|
|
|
10411
|
-
// src/cli/verify-command.ts
|
|
10412
|
-
function checkNodeVersion() {
|
|
10413
|
-
const version = process.version;
|
|
10414
|
-
const major = parseInt(version.slice(1).split(".")[0] ?? "0", 10);
|
|
10415
|
-
if (major >= 22) {
|
|
10416
|
-
return {
|
|
10417
|
-
name: "Node.js Version",
|
|
10418
|
-
passed: true,
|
|
10419
|
-
message: `${version} (LTS)`
|
|
10420
|
-
};
|
|
10421
|
-
}
|
|
10422
|
-
if (major >= 18) {
|
|
10423
|
-
return {
|
|
10424
|
-
name: "Node.js Version",
|
|
10425
|
-
passed: true,
|
|
10426
|
-
message: `${version} (supported, recommend 22.x LTS)`
|
|
10427
|
-
};
|
|
10428
|
-
}
|
|
10429
|
-
return {
|
|
10430
|
-
name: "Node.js Version",
|
|
10431
|
-
passed: false,
|
|
10432
|
-
message: `${version} (unsupported)`,
|
|
10433
|
-
fix: "Install Node.js 22.x LTS from https://nodejs.org"
|
|
10434
|
-
};
|
|
10435
|
-
}
|
|
10436
|
-
function checkPackageExports() {
|
|
10437
|
-
try {
|
|
10438
|
-
const hasVersion = typeof VERSION === "string" && VERSION.length > 0;
|
|
10439
|
-
const hasConfig = typeof defaultConfig === "object";
|
|
10440
|
-
const hasBuiltInExperts = typeof BUILT_IN_EXPERTS === "object";
|
|
10441
|
-
if (hasVersion && hasConfig && hasBuiltInExperts) {
|
|
10442
|
-
return {
|
|
10443
|
-
name: "Package Exports",
|
|
10444
|
-
passed: true,
|
|
10445
|
-
message: "All core modules accessible"
|
|
10446
|
-
};
|
|
10447
|
-
}
|
|
10448
|
-
return {
|
|
10449
|
-
name: "Package Exports",
|
|
10450
|
-
passed: false,
|
|
10451
|
-
message: "Some modules failed to load",
|
|
10452
|
-
fix: "Try reinstalling: npm install -g nexus-agents"
|
|
10453
|
-
};
|
|
10454
|
-
} catch {
|
|
10455
|
-
return {
|
|
10456
|
-
name: "Package Exports",
|
|
10457
|
-
passed: false,
|
|
10458
|
-
message: "Failed to load core modules",
|
|
10459
|
-
fix: "Try reinstalling: npm install -g nexus-agents"
|
|
10460
|
-
};
|
|
10461
|
-
}
|
|
10462
|
-
}
|
|
10463
|
-
function checkConfigLoading() {
|
|
10464
|
-
try {
|
|
10465
|
-
const hasModels = typeof defaultConfig.models === "object";
|
|
10466
|
-
const hasSecurity = typeof defaultConfig.security === "object";
|
|
10467
|
-
if (hasModels && hasSecurity) {
|
|
10468
|
-
return {
|
|
10469
|
-
name: "Configuration",
|
|
10470
|
-
passed: true,
|
|
10471
|
-
message: "Default config accessible"
|
|
10472
|
-
};
|
|
10473
|
-
}
|
|
10474
|
-
return {
|
|
10475
|
-
name: "Configuration",
|
|
10476
|
-
passed: true,
|
|
10477
|
-
// Config errors are not fatal for verification
|
|
10478
|
-
message: "Using default configuration"
|
|
10479
|
-
};
|
|
10480
|
-
} catch {
|
|
10481
|
-
return {
|
|
10482
|
-
name: "Configuration",
|
|
10483
|
-
passed: true,
|
|
10484
|
-
// Still works with defaults
|
|
10485
|
-
message: "Using default configuration"
|
|
10486
|
-
};
|
|
10487
|
-
}
|
|
10488
|
-
}
|
|
10489
|
-
function checkExpertSystem() {
|
|
10490
|
-
const expertTypes = Object.keys(BUILT_IN_EXPERTS);
|
|
10491
|
-
const count = expertTypes.length;
|
|
10492
|
-
if (count >= 5) {
|
|
10493
|
-
return {
|
|
10494
|
-
name: "Expert System",
|
|
10495
|
-
passed: true,
|
|
10496
|
-
message: `${String(count)} expert types available`
|
|
10497
|
-
};
|
|
10498
|
-
}
|
|
10499
|
-
return {
|
|
10500
|
-
name: "Expert System",
|
|
10501
|
-
passed: false,
|
|
10502
|
-
message: "Expert types not loaded",
|
|
10503
|
-
fix: "Try reinstalling: npm install -g nexus-agents"
|
|
10504
|
-
};
|
|
10505
|
-
}
|
|
10506
|
-
function runVerify() {
|
|
10507
|
-
const time = getTimeProvider();
|
|
10508
|
-
const startTime = time.now();
|
|
10509
|
-
const checks = [
|
|
10510
|
-
checkNodeVersion(),
|
|
10511
|
-
checkPackageExports(),
|
|
10512
|
-
checkConfigLoading(),
|
|
10513
|
-
checkExpertSystem()
|
|
10514
|
-
];
|
|
10515
|
-
const allPassed = checks.every((c) => c.passed);
|
|
10516
|
-
const durationMs = time.now() - startTime;
|
|
10517
|
-
return Promise.resolve({
|
|
10518
|
-
version: VERSION,
|
|
10519
|
-
nodeVersion: process.version,
|
|
10520
|
-
checks,
|
|
10521
|
-
allPassed,
|
|
10522
|
-
durationMs
|
|
10523
|
-
});
|
|
10524
|
-
}
|
|
10525
|
-
function formatCheck(check) {
|
|
10526
|
-
const symbol = check.passed ? `${colors.green}${symbols.check}${colors.reset}` : `${colors.red}${symbols.cross}${colors.reset}`;
|
|
10527
|
-
let line = ` ${symbol} ${check.name}: ${check.message}`;
|
|
10528
|
-
if (!check.passed && check.fix !== void 0) {
|
|
10529
|
-
line += `
|
|
10530
|
-
${colors.dim}Fix: ${check.fix}${colors.reset}`;
|
|
10531
|
-
}
|
|
10532
|
-
return line;
|
|
10533
|
-
}
|
|
10534
|
-
function printVerifyResult(result, verbose) {
|
|
10535
|
-
process.stdout.write("\n");
|
|
10536
|
-
process.stdout.write(`${colors.bold}nexus-agents verify${colors.reset}
|
|
10537
|
-
`);
|
|
10538
|
-
process.stdout.write("===================\n");
|
|
10539
|
-
process.stdout.write("\n");
|
|
10540
|
-
process.stdout.write(`Version: ${result.version}
|
|
10541
|
-
`);
|
|
10542
|
-
process.stdout.write(`Node.js: ${result.nodeVersion}
|
|
10543
|
-
`);
|
|
10544
|
-
process.stdout.write("\n");
|
|
10545
|
-
process.stdout.write(`${colors.cyan}Running checks...${colors.reset}
|
|
10546
|
-
`);
|
|
10547
|
-
process.stdout.write("\n");
|
|
10548
|
-
for (const check of result.checks) {
|
|
10549
|
-
process.stdout.write(formatCheck(check) + "\n");
|
|
10550
|
-
}
|
|
10551
|
-
process.stdout.write("\n");
|
|
10552
|
-
if (result.allPassed) {
|
|
10553
|
-
process.stdout.write(
|
|
10554
|
-
`${colors.green}${colors.bold}Installation verified successfully!${colors.reset}
|
|
10555
|
-
`
|
|
10556
|
-
);
|
|
10557
|
-
process.stdout.write("\n");
|
|
10558
|
-
process.stdout.write(`${colors.cyan}Next steps:${colors.reset}
|
|
10559
|
-
`);
|
|
10560
|
-
process.stdout.write(' 1. Run "nexus-agents doctor" to check external CLI integrations\n');
|
|
10561
|
-
process.stdout.write(
|
|
10562
|
-
' 2. Run "nexus-agents review --setup" to configure GitHub integration\n'
|
|
10563
|
-
);
|
|
10564
|
-
process.stdout.write(' 3. Try "nexus-agents --help" for all available commands\n');
|
|
10565
|
-
} else {
|
|
10566
|
-
const failedCount = result.checks.filter((c) => !c.passed).length;
|
|
10567
|
-
process.stdout.write(
|
|
10568
|
-
`${colors.red}${colors.bold}Verification failed: ${String(failedCount)} issue(s) found${colors.reset}
|
|
10569
|
-
`
|
|
10570
|
-
);
|
|
10571
|
-
process.stdout.write("\n");
|
|
10572
|
-
process.stdout.write("Please fix the issues above and try again.\n");
|
|
10573
|
-
}
|
|
10574
|
-
process.stdout.write("\n");
|
|
10575
|
-
if (verbose) {
|
|
10576
|
-
process.stdout.write(`${colors.dim}Duration: ${String(result.durationMs)}ms${colors.reset}
|
|
10577
|
-
`);
|
|
10578
|
-
process.stdout.write("\n");
|
|
10579
|
-
}
|
|
10580
|
-
}
|
|
10581
|
-
async function verifyCommand(options) {
|
|
10582
|
-
const result = await runVerify();
|
|
10583
|
-
printVerifyResult(result, options.verbose);
|
|
10584
|
-
return result.allPassed ? 0 : 1;
|
|
10585
|
-
}
|
|
10586
|
-
|
|
10587
10421
|
// src/cli/swe-bench-command.ts
|
|
10588
10422
|
import * as os2 from "os";
|
|
10589
10423
|
import * as path18 from "path";
|
|
@@ -16909,6 +16743,230 @@ function authCommand(subcommand, options) {
|
|
|
16909
16743
|
}
|
|
16910
16744
|
}
|
|
16911
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
|
+
|
|
16912
16970
|
// src/cli-help-text.ts
|
|
16913
16971
|
var HELP_TEXT = `
|
|
16914
16972
|
nexus-agents - Intelligent orchestration platform for AI coding tools
|
|
@@ -17293,6 +17351,15 @@ EXAMPLES:
|
|
|
17293
17351
|
|
|
17294
17352
|
For more information, visit: https://github.com/williamzujkowski/nexus-agents
|
|
17295
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
|
+
}
|
|
17296
17363
|
|
|
17297
17364
|
// src/cli-types.ts
|
|
17298
17365
|
var EXIT_CODES = {
|
|
@@ -17321,6 +17388,11 @@ var PARSE_ARGS_CONFIG = {
|
|
|
17321
17388
|
type: "boolean",
|
|
17322
17389
|
default: false
|
|
17323
17390
|
},
|
|
17391
|
+
// Tiered --help output (Issue #2135): `--help --all` unhides maintainer commands
|
|
17392
|
+
all: {
|
|
17393
|
+
type: "boolean",
|
|
17394
|
+
default: false
|
|
17395
|
+
},
|
|
17324
17396
|
mode: {
|
|
17325
17397
|
type: "string",
|
|
17326
17398
|
short: "m",
|
|
@@ -17516,6 +17588,16 @@ var PARSE_ARGS_CONFIG = {
|
|
|
17516
17588
|
type: "string",
|
|
17517
17589
|
default: "user"
|
|
17518
17590
|
},
|
|
17591
|
+
// Setup --custom-api for OpenAI-compatible gateway configuration (#2124)
|
|
17592
|
+
"custom-api": {
|
|
17593
|
+
type: "string"
|
|
17594
|
+
},
|
|
17595
|
+
"custom-api-key": {
|
|
17596
|
+
type: "string"
|
|
17597
|
+
},
|
|
17598
|
+
"custom-model": {
|
|
17599
|
+
type: "string"
|
|
17600
|
+
},
|
|
17519
17601
|
// Demo command options
|
|
17520
17602
|
mock: {
|
|
17521
17603
|
type: "boolean",
|
|
@@ -20523,6 +20605,10 @@ async function handleDoctorCommand(args) {
|
|
|
20523
20605
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20524
20606
|
}
|
|
20525
20607
|
async function handleSetupCommandAsync(args) {
|
|
20608
|
+
if (args.options.customApi !== void 0 && args.options.customApi !== "") {
|
|
20609
|
+
const exitCode2 = await runCustomApiSetup(args);
|
|
20610
|
+
process.exit(exitCode2);
|
|
20611
|
+
}
|
|
20526
20612
|
const exitCode = await setupCommandAsync({
|
|
20527
20613
|
interactive: args.options.interactive,
|
|
20528
20614
|
nonInteractive: args.options.nonInteractive,
|
|
@@ -20540,6 +20626,33 @@ async function handleSetupCommandAsync(args) {
|
|
|
20540
20626
|
});
|
|
20541
20627
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20542
20628
|
}
|
|
20629
|
+
async function runCustomApiSetup(args) {
|
|
20630
|
+
const { configureCustomApi } = await import("./setup-custom-api-XAWKRDWV.js");
|
|
20631
|
+
const baseUrl = args.options.customApi;
|
|
20632
|
+
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20633
|
+
const input = {
|
|
20634
|
+
baseUrl,
|
|
20635
|
+
nonInteractive: args.options.nonInteractive,
|
|
20636
|
+
...args.options.customApiKey !== void 0 ? { apiKey: args.options.customApiKey } : {},
|
|
20637
|
+
...args.options.customModel !== void 0 ? { model: args.options.customModel } : {}
|
|
20638
|
+
};
|
|
20639
|
+
const result = await configureCustomApi(input);
|
|
20640
|
+
if (!result.ok) {
|
|
20641
|
+
process.stderr.write(`\u2717 ${result.error.message}
|
|
20642
|
+
`);
|
|
20643
|
+
return EXIT_CODES.SERVER_START_FAILED;
|
|
20644
|
+
}
|
|
20645
|
+
const { baseUrl: canonical, model, probeSucceeded, shellFragment } = result.value;
|
|
20646
|
+
process.stdout.write(`\u2713 Gateway validated: ${canonical}
|
|
20647
|
+
`);
|
|
20648
|
+
process.stdout.write(`\u2713 Model: ${model}
|
|
20649
|
+
`);
|
|
20650
|
+
if (probeSucceeded) process.stdout.write(`\u2713 Probe succeeded (GET /models \u2192 2xx)
|
|
20651
|
+
`);
|
|
20652
|
+
process.stdout.write("\nAdd the following to your shell rc (~/.bashrc, ~/.zshrc, etc.):\n\n");
|
|
20653
|
+
process.stdout.write(shellFragment);
|
|
20654
|
+
return EXIT_CODES.SUCCESS;
|
|
20655
|
+
}
|
|
20543
20656
|
function handleHelloCommand(_args) {
|
|
20544
20657
|
const exitCode = helloCommand();
|
|
20545
20658
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
@@ -22572,8 +22685,9 @@ async function handleValidateCommand(args) {
|
|
|
22572
22685
|
}
|
|
22573
22686
|
|
|
22574
22687
|
// src/cli-commands.ts
|
|
22575
|
-
function printHelp() {
|
|
22576
|
-
|
|
22688
|
+
function printHelp(args) {
|
|
22689
|
+
const all = args?.options.all ?? false;
|
|
22690
|
+
process.stdout.write(renderHelp({ all }) + "\n");
|
|
22577
22691
|
}
|
|
22578
22692
|
function printVersion() {
|
|
22579
22693
|
process.stdout.write(`nexus-agents v${VERSION}
|
|
@@ -22610,7 +22724,7 @@ var SYNC_COMMAND_HANDLERS = {
|
|
|
22610
22724
|
};
|
|
22611
22725
|
function handleSyncCommand(args) {
|
|
22612
22726
|
if (args.command === "help") {
|
|
22613
|
-
printHelp();
|
|
22727
|
+
printHelp(args);
|
|
22614
22728
|
process.exit(EXIT_CODES.SUCCESS);
|
|
22615
22729
|
}
|
|
22616
22730
|
if (args.command === "version") {
|
|
@@ -22774,7 +22888,16 @@ var SETUP_HELP = {
|
|
|
22774
22888
|
description: "MCP config scope: user, project",
|
|
22775
22889
|
defaultValue: "user"
|
|
22776
22890
|
},
|
|
22777
|
-
{ flag: "--dry-run", description: "Show changes without applying them" }
|
|
22891
|
+
{ flag: "--dry-run", description: "Show changes without applying them" },
|
|
22892
|
+
{
|
|
22893
|
+
flag: "--custom-api <url>",
|
|
22894
|
+
description: "Configure OpenAI-compatible gateway (short-circuits normal setup; validates URL + probes /models) [#2124]"
|
|
22895
|
+
},
|
|
22896
|
+
{ flag: "--custom-api-key <key>", description: "API key for --custom-api (else prompt/env)" },
|
|
22897
|
+
{
|
|
22898
|
+
flag: "--custom-model <id>",
|
|
22899
|
+
description: "Default model for --custom-api (default: gpt-4o)"
|
|
22900
|
+
}
|
|
22778
22901
|
]
|
|
22779
22902
|
};
|
|
22780
22903
|
var CONFIG_HELP = {
|
|
@@ -23016,6 +23139,7 @@ function buildOptions(values) {
|
|
|
23016
23139
|
version: values.version,
|
|
23017
23140
|
verbose: values.verbose,
|
|
23018
23141
|
interactive: values.interactive,
|
|
23142
|
+
all: values.all,
|
|
23019
23143
|
mode: detectionResult.mode,
|
|
23020
23144
|
force: values.force,
|
|
23021
23145
|
format: values.format,
|