mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 14:07:55 +00:00
PR B of the post-cluster install-hardening pair (PR A: install.sh #444 — merged). The audit found native Windows was the worst path at 2/10 zero-friction: the installer refused on every missing prereq (Python / git / Ollama), didn't pull a model, and gave the user no `jarvis` command after install. This closes those gaps. Changes in deploy/windows/install.ps1: 1. Auto-install Python via winget when missing (was: hard refuse). 2. Auto-install git via the same Install-WithWinget helper. 3. Auto-install Ollama via the official OllamaSetup.exe (NSIS /S flag, $ProgressPreference SilentlyContinue for the 150 MB download). 4. Wait for Ollama daemon health before pulling the model (60s poll on `ollama list`). 5. Pull qwen3.5:2b foreground (~1.5 GB) — banner is honest if pull failed. 6. jarvis.cmd shim at %LOCALAPPDATA%\OpenJarvis\bin\ added to User PATH (deduped against expanded form so re-runs don't append). Shim uses %~dp0..\src to self-locate and uv from PATH so a future uv update can't break it. 7. Pre-check admin for the scheduled-task path; refuse fast in -Service branch if not elevated, default to skip-with-explanation in the interactive branch. 8. Final banner tells the truth: 'jarvis' if all good, 'jarvis doctor' if model missing, 'open a new PowerShell' if User PATH was just updated. Adversarial review caught 5 real bugs before commit: - CRITICAL: GetEnvironmentVariable returns REG_EXPAND_SZ raw → %LOCALAPPDATA% wasn't expanded → just-installed Python invisible. Wrap in ExpandEnvironmentVariables. - HIGH: Ollama NSIS silent flag is /S not /silent (wrong flag opens GUI, hangs install). - MEDIUM: PS 5.1 progress bar makes Invoke-WebRequest 30x slower. - LOW: -Service branch missed isAdmin precheck. - LOW: PATH dedup missed unexpanded %VAR% entries → duplicate every re-run. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>