Add first-run setup wizard + doctor diagnostics

New users hit predictable friction (no npm install, Remote Control / Python
plugin not enabled, C++ not built). This makes onboarding self-service:

- src/doctor.js — shared diagnostics (project & engine detection, Node deps,
  Remote Control reachability, Python plugin, C++ module built, optional Voxel).
  Zero-dependency top-level imports so it runs before `npm install`. Runnable as
  `npm run doctor`, reused by the wizard and the server first-run hook.
- src/setup.js — interactive `npm run setup` wizard: offers to install deps,
  confirms/pins project & engine (and RC URL) overrides, re-checks the editor
  until reachable, then prints the MCP-client config snippet.
- projectPaths.js — persisted config (mcp.config.json, git-ignored) with
  precedence env > config > auto-detect; remoteControlUrl(); first-run marker
  helpers (isFirstRun/markRun under Saved/).
- server.js — `doctor` MCP tool (so a client/assistant can run the checks in a
  session) + a one-time first-run diagnostic printed to stderr pointing at
  `npm run setup`.
- ueBridge.js honors the config-driven Remote Control URL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bonchellon
2026-06-24 01:15:52 +03:00
parent eba71c4ca8
commit 04c1e92a63
8 changed files with 438 additions and 8 deletions

3
.gitignore vendored
View File

@ -91,3 +91,6 @@ agent-gateway/.generated-audio/
# real API keys live in a local, untracked copy
integrations.local.json
# Local setup-wizard overrides (machine-specific — never commit)
mcp.config.json