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
|
@@ -3,16 +3,25 @@ import {
|
|
|
3
3
|
} from "./chunk-EKYT4NMD.js";
|
|
4
4
|
import {
|
|
5
5
|
VERSION,
|
|
6
|
+
checkApiKeys,
|
|
7
|
+
checkDataDirectory,
|
|
8
|
+
checkSqlite,
|
|
9
|
+
defaultConfig,
|
|
6
10
|
initDataDirectories
|
|
7
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-C3FGEDD7.js";
|
|
12
|
+
import {
|
|
13
|
+
BUILT_IN_EXPERTS
|
|
14
|
+
} from "./chunk-GJVHRJO2.js";
|
|
8
15
|
import {
|
|
9
16
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
17
|
+
colors,
|
|
10
18
|
createLogger,
|
|
11
19
|
formatCodeBlock,
|
|
12
20
|
formatHeader,
|
|
13
21
|
formatStatus,
|
|
14
22
|
getErrorMessage,
|
|
15
|
-
getTimeProvider
|
|
23
|
+
getTimeProvider,
|
|
24
|
+
symbols
|
|
16
25
|
} from "./chunk-UOUJZIKH.js";
|
|
17
26
|
|
|
18
27
|
// src/cli/setup-command.ts
|
|
@@ -1050,6 +1059,265 @@ function buildPermissionsBanner(snippet) {
|
|
|
1050
1059
|
].join("\n");
|
|
1051
1060
|
}
|
|
1052
1061
|
|
|
1062
|
+
// src/cli/verify-command.ts
|
|
1063
|
+
function checkNodeVersion() {
|
|
1064
|
+
const version = process.version;
|
|
1065
|
+
const major = parseInt(version.slice(1).split(".")[0] ?? "0", 10);
|
|
1066
|
+
if (major >= 22) {
|
|
1067
|
+
return {
|
|
1068
|
+
name: "Node.js Version",
|
|
1069
|
+
passed: true,
|
|
1070
|
+
message: `${version} (LTS)`
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
if (major >= 18) {
|
|
1074
|
+
return {
|
|
1075
|
+
name: "Node.js Version",
|
|
1076
|
+
passed: true,
|
|
1077
|
+
message: `${version} (supported, recommend 22.x LTS)`
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
return {
|
|
1081
|
+
name: "Node.js Version",
|
|
1082
|
+
passed: false,
|
|
1083
|
+
message: `${version} (unsupported)`,
|
|
1084
|
+
fix: "Install Node.js 22.x LTS from https://nodejs.org"
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
function checkPackageExports() {
|
|
1088
|
+
try {
|
|
1089
|
+
const hasVersion = typeof VERSION === "string" && VERSION.length > 0;
|
|
1090
|
+
const hasConfig = typeof defaultConfig === "object";
|
|
1091
|
+
const hasBuiltInExperts = typeof BUILT_IN_EXPERTS === "object";
|
|
1092
|
+
if (hasVersion && hasConfig && hasBuiltInExperts) {
|
|
1093
|
+
return {
|
|
1094
|
+
name: "Package Exports",
|
|
1095
|
+
passed: true,
|
|
1096
|
+
message: "All core modules accessible"
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
return {
|
|
1100
|
+
name: "Package Exports",
|
|
1101
|
+
passed: false,
|
|
1102
|
+
message: "Some modules failed to load",
|
|
1103
|
+
fix: "Try reinstalling: npm install -g nexus-agents"
|
|
1104
|
+
};
|
|
1105
|
+
} catch {
|
|
1106
|
+
return {
|
|
1107
|
+
name: "Package Exports",
|
|
1108
|
+
passed: false,
|
|
1109
|
+
message: "Failed to load core modules",
|
|
1110
|
+
fix: "Try reinstalling: npm install -g nexus-agents"
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
function checkConfigLoading() {
|
|
1115
|
+
try {
|
|
1116
|
+
const hasModels = typeof defaultConfig.models === "object";
|
|
1117
|
+
const hasSecurity = typeof defaultConfig.security === "object";
|
|
1118
|
+
if (hasModels && hasSecurity) {
|
|
1119
|
+
return {
|
|
1120
|
+
name: "Configuration",
|
|
1121
|
+
passed: true,
|
|
1122
|
+
message: "Default config accessible"
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
return {
|
|
1126
|
+
name: "Configuration",
|
|
1127
|
+
passed: true,
|
|
1128
|
+
// Config errors are not fatal for verification
|
|
1129
|
+
message: "Using default configuration"
|
|
1130
|
+
};
|
|
1131
|
+
} catch {
|
|
1132
|
+
return {
|
|
1133
|
+
name: "Configuration",
|
|
1134
|
+
passed: true,
|
|
1135
|
+
// Still works with defaults
|
|
1136
|
+
message: "Using default configuration"
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
function checkExpertSystem() {
|
|
1141
|
+
const expertTypes = Object.keys(BUILT_IN_EXPERTS);
|
|
1142
|
+
const count = expertTypes.length;
|
|
1143
|
+
if (count >= 5) {
|
|
1144
|
+
return {
|
|
1145
|
+
name: "Expert System",
|
|
1146
|
+
passed: true,
|
|
1147
|
+
message: `${String(count)} expert types available`
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
return {
|
|
1151
|
+
name: "Expert System",
|
|
1152
|
+
passed: false,
|
|
1153
|
+
message: "Expert types not loaded",
|
|
1154
|
+
fix: "Try reinstalling: npm install -g nexus-agents"
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
async function checkSqliteAvailability() {
|
|
1158
|
+
const result = await checkSqlite();
|
|
1159
|
+
if (result.available) {
|
|
1160
|
+
return {
|
|
1161
|
+
name: "SQLite Storage",
|
|
1162
|
+
passed: true,
|
|
1163
|
+
message: "better-sqlite3 loaded (memory backends available)"
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
return {
|
|
1167
|
+
name: "SQLite Storage",
|
|
1168
|
+
passed: false,
|
|
1169
|
+
severity: "warn",
|
|
1170
|
+
message: result.error ?? "better-sqlite3 not available",
|
|
1171
|
+
fix: 'Run "pnpm rebuild better-sqlite3" or reinstall nexus-agents'
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
function checkDataDirs() {
|
|
1175
|
+
const result = checkDataDirectory();
|
|
1176
|
+
const unwritable = result.subdirectories.filter((s) => !s.exists || !s.writable);
|
|
1177
|
+
if (result.rootExists && unwritable.length === 0) {
|
|
1178
|
+
return {
|
|
1179
|
+
name: "Data Directories",
|
|
1180
|
+
passed: true,
|
|
1181
|
+
message: `${result.rootPath} (all subdirectories writable)`
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
if (!result.rootExists) {
|
|
1185
|
+
return {
|
|
1186
|
+
name: "Data Directories",
|
|
1187
|
+
passed: false,
|
|
1188
|
+
severity: "warn",
|
|
1189
|
+
message: `${result.rootPath} does not exist`,
|
|
1190
|
+
fix: "Run any nexus-agents command \u2014 directories auto-initialize on first run"
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
return {
|
|
1194
|
+
name: "Data Directories",
|
|
1195
|
+
passed: false,
|
|
1196
|
+
severity: "warn",
|
|
1197
|
+
message: `${String(unwritable.length)} subdirectory(ies) unwritable: ${unwritable.map((s) => s.name).join(", ")}`,
|
|
1198
|
+
fix: `Check filesystem permissions on ${result.rootPath}`
|
|
1199
|
+
};
|
|
1200
|
+
}
|
|
1201
|
+
function checkAdapterAvailability() {
|
|
1202
|
+
const keys = checkApiKeys();
|
|
1203
|
+
const configured = keys.filter((k) => k.configured);
|
|
1204
|
+
if (configured.length > 0) {
|
|
1205
|
+
return {
|
|
1206
|
+
name: "Adapter Availability",
|
|
1207
|
+
passed: true,
|
|
1208
|
+
message: `${String(configured.length)} API key(s) configured: ${configured.map((k) => k.name).join(", ")}`
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
return {
|
|
1212
|
+
name: "Adapter Availability",
|
|
1213
|
+
passed: false,
|
|
1214
|
+
severity: "warn",
|
|
1215
|
+
message: "No API keys configured (ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_AI_API_KEY)",
|
|
1216
|
+
fix: 'Set at least one API key, or install a CLI (claude/gemini/codex/opencode) and run "nexus-agents doctor"'
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
async function runVerify() {
|
|
1220
|
+
const time = getTimeProvider();
|
|
1221
|
+
const startTime = time.now();
|
|
1222
|
+
const checks = [
|
|
1223
|
+
checkNodeVersion(),
|
|
1224
|
+
checkPackageExports(),
|
|
1225
|
+
checkConfigLoading(),
|
|
1226
|
+
checkExpertSystem(),
|
|
1227
|
+
await checkSqliteAvailability(),
|
|
1228
|
+
checkDataDirs(),
|
|
1229
|
+
checkAdapterAvailability()
|
|
1230
|
+
];
|
|
1231
|
+
const allPassed = checks.every((c) => c.passed);
|
|
1232
|
+
const noHardFailures = checks.every((c) => c.passed || c.severity === "warn");
|
|
1233
|
+
const durationMs = time.now() - startTime;
|
|
1234
|
+
return {
|
|
1235
|
+
version: VERSION,
|
|
1236
|
+
nodeVersion: process.version,
|
|
1237
|
+
checks,
|
|
1238
|
+
allPassed,
|
|
1239
|
+
noHardFailures,
|
|
1240
|
+
durationMs
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
function formatCheck(check) {
|
|
1244
|
+
let symbol;
|
|
1245
|
+
if (check.passed) {
|
|
1246
|
+
symbol = `${colors.green}${symbols.check}${colors.reset}`;
|
|
1247
|
+
} else if (check.severity === "warn") {
|
|
1248
|
+
symbol = `${colors.yellow}${symbols.warn}${colors.reset}`;
|
|
1249
|
+
} else {
|
|
1250
|
+
symbol = `${colors.red}${symbols.cross}${colors.reset}`;
|
|
1251
|
+
}
|
|
1252
|
+
let line = ` ${symbol} ${check.name}: ${check.message}`;
|
|
1253
|
+
if (!check.passed && check.fix !== void 0) {
|
|
1254
|
+
line += `
|
|
1255
|
+
${colors.dim}Fix: ${check.fix}${colors.reset}`;
|
|
1256
|
+
}
|
|
1257
|
+
return line;
|
|
1258
|
+
}
|
|
1259
|
+
function printVerifyResult(result, verbose) {
|
|
1260
|
+
process.stdout.write("\n");
|
|
1261
|
+
process.stdout.write(`${colors.bold}nexus-agents verify${colors.reset}
|
|
1262
|
+
`);
|
|
1263
|
+
process.stdout.write("===================\n");
|
|
1264
|
+
process.stdout.write("\n");
|
|
1265
|
+
process.stdout.write(`Version: ${result.version}
|
|
1266
|
+
`);
|
|
1267
|
+
process.stdout.write(`Node.js: ${result.nodeVersion}
|
|
1268
|
+
`);
|
|
1269
|
+
process.stdout.write("\n");
|
|
1270
|
+
process.stdout.write(`${colors.cyan}Running checks...${colors.reset}
|
|
1271
|
+
`);
|
|
1272
|
+
process.stdout.write("\n");
|
|
1273
|
+
for (const check of result.checks) {
|
|
1274
|
+
process.stdout.write(formatCheck(check) + "\n");
|
|
1275
|
+
}
|
|
1276
|
+
process.stdout.write("\n");
|
|
1277
|
+
const warnCount = result.checks.filter((c) => !c.passed && c.severity === "warn").length;
|
|
1278
|
+
const hardCount = result.checks.filter((c) => !c.passed && c.severity !== "warn").length;
|
|
1279
|
+
if (result.allPassed) {
|
|
1280
|
+
process.stdout.write(
|
|
1281
|
+
`${colors.green}${colors.bold}Installation verified successfully!${colors.reset}
|
|
1282
|
+
`
|
|
1283
|
+
);
|
|
1284
|
+
process.stdout.write("\n");
|
|
1285
|
+
process.stdout.write(`${colors.cyan}Next steps:${colors.reset}
|
|
1286
|
+
`);
|
|
1287
|
+
process.stdout.write(' 1. Run "nexus-agents doctor" to check external CLI integrations\n');
|
|
1288
|
+
process.stdout.write(
|
|
1289
|
+
' 2. Run "nexus-agents review --setup" to configure GitHub integration\n'
|
|
1290
|
+
);
|
|
1291
|
+
process.stdout.write(' 3. Try "nexus-agents --help" for all available commands\n');
|
|
1292
|
+
} else if (hardCount === 0) {
|
|
1293
|
+
process.stdout.write(
|
|
1294
|
+
`${colors.yellow}${colors.bold}Verified with ${String(warnCount)} warning(s) \u2014 functional but degraded${colors.reset}
|
|
1295
|
+
`
|
|
1296
|
+
);
|
|
1297
|
+
process.stdout.write("\n");
|
|
1298
|
+
process.stdout.write("The warnings above indicate reduced functionality but will not\n");
|
|
1299
|
+
process.stdout.write("prevent nexus-agents from running. Fix them when convenient.\n");
|
|
1300
|
+
} else {
|
|
1301
|
+
process.stdout.write(
|
|
1302
|
+
`${colors.red}${colors.bold}Verification failed: ${String(hardCount)} blocking issue(s), ${String(warnCount)} warning(s)${colors.reset}
|
|
1303
|
+
`
|
|
1304
|
+
);
|
|
1305
|
+
process.stdout.write("\n");
|
|
1306
|
+
process.stdout.write("Please fix the blocking issues above and try again.\n");
|
|
1307
|
+
}
|
|
1308
|
+
process.stdout.write("\n");
|
|
1309
|
+
if (verbose) {
|
|
1310
|
+
process.stdout.write(`${colors.dim}Duration: ${String(result.durationMs)}ms${colors.reset}
|
|
1311
|
+
`);
|
|
1312
|
+
process.stdout.write("\n");
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
async function verifyCommand(options) {
|
|
1316
|
+
const result = await runVerify();
|
|
1317
|
+
printVerifyResult(result, options.verbose);
|
|
1318
|
+
return result.noHardFailures ? 0 : 1;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1053
1321
|
// src/cli/setup-command.ts
|
|
1054
1322
|
function writeLine2(text) {
|
|
1055
1323
|
process.stdout.write(text + "\n");
|
|
@@ -1547,6 +1815,60 @@ function printSetupResult(result, verbose) {
|
|
|
1547
1815
|
printNextSteps(result.mcpConfigured === true, result.mcpSnippet !== void 0);
|
|
1548
1816
|
printSummary(result.success);
|
|
1549
1817
|
}
|
|
1818
|
+
function printGettingStartedBanner(mcpConfigured) {
|
|
1819
|
+
writeEmptyLine2();
|
|
1820
|
+
writeLine2(formatHeader("Getting started"));
|
|
1821
|
+
writeLine2("\u2500".repeat(40));
|
|
1822
|
+
writeLine2(" 1. nexus-agents hello \u2014 guided tour (no API keys needed)");
|
|
1823
|
+
if (mcpConfigured) {
|
|
1824
|
+
writeLine2(" 2. Use through Claude Code \u2014 type /mcp in Claude to list tools");
|
|
1825
|
+
} else {
|
|
1826
|
+
writeLine2(' 2. nexus-agents orchestrate "..." \u2014 run your first task');
|
|
1827
|
+
}
|
|
1828
|
+
writeLine2(" 3. nexus-agents workflow list \u2014 explore built-in workflows");
|
|
1829
|
+
writeEmptyLine2();
|
|
1830
|
+
writeLine2(` ${colors.dim}Docs: https://github.com/williamzujkowski/nexus-agents${colors.reset}`);
|
|
1831
|
+
writeLine2(` ${colors.dim}Harness wiring: docs/guides/HARNESS_COMPATIBILITY.md${colors.reset}`);
|
|
1832
|
+
}
|
|
1833
|
+
async function runPostSetupHealthGate(dryRun) {
|
|
1834
|
+
if (dryRun) return true;
|
|
1835
|
+
const result = await runVerify();
|
|
1836
|
+
const passed = result.checks.filter((c) => c.passed).length;
|
|
1837
|
+
const total = result.checks.length;
|
|
1838
|
+
writeEmptyLine2();
|
|
1839
|
+
writeLine2(formatHeader(`Health check (${String(passed)}/${String(total)} passed)`));
|
|
1840
|
+
writeLine2("\u2500".repeat(40));
|
|
1841
|
+
for (const check of result.checks) {
|
|
1842
|
+
let symbol;
|
|
1843
|
+
if (check.passed) {
|
|
1844
|
+
symbol = `${colors.green}${symbols.check}${colors.reset}`;
|
|
1845
|
+
} else if (check.severity === "warn") {
|
|
1846
|
+
symbol = `${colors.yellow}${symbols.warn}${colors.reset}`;
|
|
1847
|
+
} else {
|
|
1848
|
+
symbol = `${colors.red}${symbols.cross}${colors.reset}`;
|
|
1849
|
+
}
|
|
1850
|
+
writeLine2(` ${symbol} ${check.name}: ${check.message}`);
|
|
1851
|
+
if (!check.passed && check.fix !== void 0) {
|
|
1852
|
+
writeLine2(` ${colors.dim}\u2192 Fix: ${check.fix}${colors.reset}`);
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
writeEmptyLine2();
|
|
1856
|
+
if (!result.noHardFailures) {
|
|
1857
|
+
writeLine2(
|
|
1858
|
+
`${colors.red}${colors.bold}Action required: fix the blocking issues above before using nexus-agents.${colors.reset}`
|
|
1859
|
+
);
|
|
1860
|
+
} else if (!result.allPassed) {
|
|
1861
|
+
const warnCount = result.checks.filter((c) => !c.passed).length;
|
|
1862
|
+
writeLine2(
|
|
1863
|
+
`${colors.yellow}${colors.bold}Setup complete with ${String(warnCount)} warning(s) \u2014 nexus-agents will run but some features are degraded.${colors.reset}`
|
|
1864
|
+
);
|
|
1865
|
+
} else {
|
|
1866
|
+
writeLine2(
|
|
1867
|
+
`${colors.green}${colors.bold}All health checks passed. nexus-agents is ready.${colors.reset}`
|
|
1868
|
+
);
|
|
1869
|
+
}
|
|
1870
|
+
return result.noHardFailures;
|
|
1871
|
+
}
|
|
1550
1872
|
function setupCommand(options = {}) {
|
|
1551
1873
|
const parsedOptions = SetupOptionsSchema.parse(options);
|
|
1552
1874
|
if (!isInteractive() && !parsedOptions.nonInteractive) {
|
|
@@ -1558,19 +1880,40 @@ function setupCommand(options = {}) {
|
|
|
1558
1880
|
printSetupResult(result, parsedOptions.verbose);
|
|
1559
1881
|
return result.success ? 0 : 1;
|
|
1560
1882
|
}
|
|
1883
|
+
async function runInteractiveSetup(options) {
|
|
1884
|
+
const wizardOptions = await runWizard();
|
|
1885
|
+
if (wizardOptions === void 0) return 1;
|
|
1886
|
+
const mergedOptions = { ...options, ...wizardOptions };
|
|
1887
|
+
delete mergedOptions.interactive;
|
|
1888
|
+
const result = runSetup(mergedOptions);
|
|
1889
|
+
printSetupResult(result, mergedOptions.verbose ?? false);
|
|
1890
|
+
const healthOk = await runPostSetupHealthGate(mergedOptions.dryRun ?? false);
|
|
1891
|
+
if (result.success && !(mergedOptions.dryRun ?? false)) {
|
|
1892
|
+
printGettingStartedBanner(result.mcpConfigured === true);
|
|
1893
|
+
}
|
|
1894
|
+
return result.success && healthOk ? 0 : 1;
|
|
1895
|
+
}
|
|
1561
1896
|
async function setupCommandAsync(options = {}) {
|
|
1562
1897
|
if (options.interactive === true) {
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1898
|
+
return runInteractiveSetup(options);
|
|
1899
|
+
}
|
|
1900
|
+
const setupResult = runSetupAndPrint(options);
|
|
1901
|
+
const healthOk = await runPostSetupHealthGate(options.dryRun ?? false);
|
|
1902
|
+
if (setupResult.exitCode === 0 && !(options.dryRun ?? false)) {
|
|
1903
|
+
printGettingStartedBanner(setupResult.mcpConfigured);
|
|
1904
|
+
}
|
|
1905
|
+
return setupResult.exitCode !== 0 || !healthOk ? 1 : 0;
|
|
1906
|
+
}
|
|
1907
|
+
function runSetupAndPrint(options) {
|
|
1908
|
+
const parsedOptions = SetupOptionsSchema.parse(options);
|
|
1909
|
+
if (!isInteractive() && !parsedOptions.nonInteractive) {
|
|
1910
|
+
writeLine2("Non-interactive environment detected.");
|
|
1911
|
+
writeLine2("Run with --non-interactive or set CI=true.");
|
|
1912
|
+
return { exitCode: 1, mcpConfigured: false };
|
|
1572
1913
|
}
|
|
1573
|
-
|
|
1914
|
+
const result = runSetup(options);
|
|
1915
|
+
printSetupResult(result, parsedOptions.verbose);
|
|
1916
|
+
return { exitCode: result.success ? 0 : 1, mcpConfigured: result.mcpConfigured === true };
|
|
1574
1917
|
}
|
|
1575
1918
|
|
|
1576
1919
|
export {
|
|
@@ -1578,9 +1921,10 @@ export {
|
|
|
1578
1921
|
generateMcpSnippet,
|
|
1579
1922
|
generateRulesContent,
|
|
1580
1923
|
runWizard,
|
|
1924
|
+
verifyCommand,
|
|
1581
1925
|
runSetup,
|
|
1582
1926
|
printSetupResult,
|
|
1583
1927
|
setupCommand,
|
|
1584
1928
|
setupCommandAsync
|
|
1585
1929
|
};
|
|
1586
|
-
//# sourceMappingURL=chunk-
|
|
1930
|
+
//# sourceMappingURL=chunk-KGMC6F5D.js.map
|