Windows pulled into %USERPROFILE%\.ollama while ncp and doctor looked in
nexus-core\models. The installer now sets OLLAMA_MODELS for its pulls and moves
an existing default store across first (instant on the same volume, no
refetch), and ollama_manager sets OLLAMA_MODELS on every platform. The env block
was duplicated in two methods, which is why the carve-out existed twice; folded
into _serve_env().
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
'ncp doctor' reported a missing Ollama binary on Windows, where winget installs
it to %LOCALAPPDATA%\Programs and on PATH rather than into the repo; the same
assumption made 'ncp models install' refuse to run there. Adds ollama_bin()
mirroring _ollama_bin() in ollama_manager.py.
Also renames wait_for_port's early message to READY - 'already running' for a
service the same command just started reads like a stale process.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The backend logged 200 OK for polls the client had already timed out on.
is_running() waited 2s for an Ollama that ships OFF (now 0.5s), is_available()
spawned 'ollama --version' every call and that command blocks ~5s when Ollama is
wedged (now cached), and both ran synchronously inside an async def, stalling the
event loop on every poll while the UI polls continuously (now to_thread).
Measured with Ollama's port blackholed: /status 5.89s -> 0.64s, concurrent GET /
stalled -> 0.06s. Poll timeout in nexus_window.py raised 2s -> 5s for margin.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ctrl+C is how you quit 'ncp web', which blocks on the UI window. It printed a
six-frame traceback ending in WaitForSingleObject, reading as a crash. Exits 130
instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The two black terminals had two causes: uvicorn --reload (a dev flag whose
reloader spawns the server as a child, and Windows gives a console window to a
child of a console-less parent), and DETACHED_PROCESS in launch(), which is
exactly the console-less condition that triggers it. Drops --reload here
(launch_nexus.sh keeps it for the Linux dev loop) and uses CREATE_NO_WINDOW.
The window now opens immediately on an inline 'Loading Nexus core services' page
and navigates to the app once /status answers, instead of waiting 40s offscreen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A process reads PATH once, at startup, so the shell the installer ran in can
never resolve ncp. The ending now says that and closes the window. Uses
Stop-Process -Id $PID rather than 'exit', which only closes the window when the
host was started with -File.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
'Press Enter to close' closed nothing when run from an existing shell, and
closing unconditionally would kill the caller's session and any transcript in
it. Adds an -OwnsWindow switch passed only to the elevated run the script starts
for itself; that run may close its own window, a guest run returns quietly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PowerShell resolves ExternalScript (.ps1) ahead of Application (.cmd), and both
lived in the directory the installer puts on PATH -- so in PowerShell `ncp` ran
the .ps1 and was execution-policy-bound again, the exact thing the .cmd exists
to avoid. Its other justification (giving ncp to pwsh on Linux) stopped being
true once /usr/local/bin/ncp existed: pwsh runs a PATH symlink to a shell script
as an Application. A test now prevents the file coming back.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Piping winget to Out-Host defeats its carriage-return redraw, so every spinner
and progress-bar frame lands as its own line. Filters the frames, keeps the
messages. Block characters spelled by code point to keep the file ASCII.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
taskkill writes to stderr when the process isn't running, and with
$ErrorActionPreference = Stop PowerShell 5.1 promotes native stderr to a
terminating error (2>$null doesn't prevent it). The normal case -- Ollama not
running -- threw and printed a failure warning for work that had succeeded.
Uses Get-Process | Stop-Process instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
winget draws its progress bar with UTF-8 block characters, but PowerShell
decodes native output using the console codepage (437), turning each block into
three Latin characters and burying the real messages. Sets
[Console]::OutputEncoding to UTF-8 in install-windows.ps1, and chcp 65001 in
ncp.cmd for the check marks and em-dashes ncp.py prints.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ctrl+C in PS 5.1 kills the whole script, and the multi-GB model pull sat in the
middle -- skipping the download also skipped the ncp PATH registration and the
desktop shortcut. Moves the pull after them. Also drops the pipe that buffered
ollama's progress bar (a running download looked like a hang) and replaces a
try/catch that native commands never trigger with $LASTEXITCODE checks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ports the ncp PATH work from upstream. Registering ncp as a shell-profile
function failed three ways on Windows: the default Restricted execution policy
blocks the profile itself, profiles don't exist outside PowerShell (cmd, Win+R,
Task Scheduler), and the self-elevating installer writes the admin's profile.
Windows now ships management/ncp.cmd and the installer appends management\ to
the Machine PATH via [Environment]::SetEnvironmentVariable -- never setx, which
truncates PATH at 1024 chars. A .cmd is exempt from the execution policy.
Linux symlinks /usr/local/bin/ncp -> management/nexus-cli.sh, falling back to
the old .bashrc function when sudo is unavailable.
Also renames requirements-wsl.txt to requirements-windows.txt and purges stale
WSL references, including vite.config.js's dev-server comment and
controlpanel.py's "Check WSLg." error string.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
management/ncp.py replaces the bash CLI's logic; nexus-cli.sh and the new
ncp.ps1 are thin wrappers, so Linux keeps its entry point and Windows gains one.
psutil handles process and port work on both platforms.
install-windows.ps1 registers ncp in the PowerShell profile. The panel VPN
switch now resolves its WireGuard connection through NetworkManager instead of
a hardcoded name, and the .ps1 ASCII guard globs rather than naming files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gen-nvidia-reqs.py wrote requirements-nvidia.txt with os.linesep, so running
it on Windows produced CRLF. Pinned to newline="\n".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
assets/gitnexus-logo.svg is branding for the Gitea instance that hosts this
project, not for NexusOS itself, so it does not belong in the public repo.
.gitignore already listed it, but gitignore does not apply to tracked files,
so it stayed until removed explicitly.
The README header already points at assets/n-small.png, so nothing references
it anymore.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bin/install.sh still rsynced --delete from a backup path retired in July, so
the documented Linux install both failed and could erase a working tree. Every
step it claimed to do already lives in bin/sync.py, shared with Windows.
Root ./install.sh is now a thin wrapper over `sync.py restore`, so deployment
stays one bash command. It also registers ncp/promethean in ~/.bashrc, which
was the only thing the old script uniquely did.
Split restore-linux.sh into runtime (Ollama binary, shell aliases) and desktop
(XFCE panel, theme, os-release). Only desktop writes outside the repo, it now
auto-skips off XFCE, and `--no-desktop` skips it explicitly. Two tests keep the
stage names in sync and the $HOME writes confined to the desktop stage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>