Register Gemini as a first-class embedding provider with endpoint/env defaults, expose it in start_tour embedding selection, and add regression coverage for runtime resolution and wizard options
Stability release after v1.3.0 covering safer RAG/KB routing, stronger
embedding validation, more reliable Docker/TutorBot restarts, Web UX
fixes, and Windows/encoding hardening. See assets/releases/ver1-3-1.md
for the full notes.
Made-with: Cursor
On Windows, npm is installed as npm.cmd rather than a plain executable.
subprocess.run(['npm', '--version']) without shell=True raises
FileNotFoundError, causing the Node.js detection step to always report
npm as missing even when it is properly installed.
Reuse the existing _get_npm_command() helper (which already returns
npm.cmd on Windows) for the version-detection call, consistent with
how npm is invoked later during npm install.
uv-managed .venv environments may have pip disabled (PEP 668 / uv's
default hardening). Running `python -m pip install` inside such a venv
raises a CalledProcessError even though uv itself is available.
Introduce `_resolve_pip_cmd()` which checks `shutil.which("uv")` at startup:
- uv found → use ["uv", "pip"] (uv auto-detects the active venv)
- uv absent → fall back to [_PYTHON, "-m", "pip"] (no regression)
All pip invocations in `_bootstrap()` and `_install_commands()` now use
`_PIP_CMD` instead of the hard-coded `[_PYTHON, "-m", "pip"]` prefix.
On macOS with Homebrew Python, `Path(sys.executable).resolve()` follows
the venv symlink back to the system interpreter. PEP 668 then blocks
pip installs with "externally-managed-environment", causing the setup
tour to fail.
Swap the check order so the unresolved venv path is preferred when it
exists, falling back to the resolved path only when necessary.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add _get_npm_command() helper to resolve npm path on Windows
- Use shell=True in _run_cmd() on Windows to support .cmd files
- Fix FileNotFoundError when running npm install on Windows
This fixes the issue where shutil.which('npm') fails to find npm.cmd
on Windows, causing the setup tour to fail during dependency installation.