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
This commit is contained in:
2026-06-05 15:22:23 +00:00
parent a33f12c74f
commit fde87b6274
4 changed files with 109 additions and 12 deletions
+18
View File
@@ -1001,9 +1001,21 @@ function spawnAgent(
stdio: ["ignore", "pipe", "pipe"],
maxBuffer: 50 * 1024 * 1024, // 50 MB — stream-json output can be large
cwd,
env: {
...process.env,
NODE_OPTIONS: [process.env.NODE_OPTIONS, "--disable-warning=ExperimentalWarning"]
.filter(Boolean)
.join(" "),
},
});
} catch (e) {
const err = e as NodeJS.ErrnoException & { stderr?: Buffer | string | null };
if (err.code === "ENOENT") {
failStep(
plog,
`"${agent.command}" not found in PATH. Install it or check your PATH config. Run: which ${agent.command}`,
);
}
const stderr =
err.stderr == null
? ""
@@ -1242,6 +1254,12 @@ async function cmdThreadStepBackground(
const child = spawn(scriptPath, args, {
detached: true,
stdio: "ignore",
env: {
...process.env,
NODE_OPTIONS: [process.env.NODE_OPTIONS, "--disable-warning=ExperimentalWarning"]
.filter(Boolean)
.join(" "),
},
});
child.unref();