Compare commits

..

1 Commits

Author SHA1 Message Date
xiaoju fde87b6274 fix: setup UX improvements — adapter check, ENOENT, SQLite warning, VERSION, PATH docs
CI / check (pull_request) Successful in 2m24s
- setup validates adapter binary availability, prints install command if missing
- setup prints 'Config saved to <path> ✓' on success
- spawn ENOENT gives actionable error with which command
- SQLite ExperimentalWarning suppressed via NODE_OPTIONS
- bootstrap VERSION reads cli package.json (was reading util)
- bootstrap PATH guidance is shell-agnostic

Fixes #114
2026-06-05 15:42:22 +00:00
2 changed files with 4 additions and 3 deletions
+4 -1
View File
@@ -14,7 +14,10 @@ function _findCliVersion(): string {
for (let i = 0; i < 5; i++) {
const candidate = join(dir, "package.json");
try {
const pkg = JSON.parse(readFileSync(candidate, "utf-8")) as { name?: string; version?: string };
const pkg = JSON.parse(readFileSync(candidate, "utf-8")) as {
name?: string;
version?: string;
};
if (pkg.name === "@united-workforce/cli") {
return pkg.version ?? "0.0.0";
}
-2
View File
@@ -443,7 +443,6 @@ export async function cmdSetup(args: SetupArgs): Promise<Record<string, unknown>
writeFileSync(configPath, stringify(merged, { indent: 2 }), "utf8");
// Print config path to stderr (stdout is reserved for JSON output)
// biome-ignore lint/nursery/noConsole: CLI user-facing output
console.error(`Config saved to ${configPath}`);
// Validate model connectivity
@@ -453,7 +452,6 @@ export async function cmdSetup(args: SetupArgs): Promise<Record<string, unknown>
const agentName = _agentNameFromBinary(args.agent ?? "hermes");
const adapterWarnings = _checkAdapterAvailability(agentName);
for (const w of adapterWarnings) {
// biome-ignore lint/nursery/noConsole: CLI user-facing output
console.error(`${w}`);
}