diff --git a/CHANGELOG.md b/CHANGELOG.md index 803a379a..a3e8924d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added +- **`start.ps1`: native Windows launcher candidate-path expansion** — extends `start.ps1`'s hermes-agent auto-discovery to also check `%LOCALAPPDATA%\hermes\hermes-agent`, `%PROGRAMFILES%\hermes\hermes-agent`, and `%PROGRAMFILES(X86)%\hermes\hermes-agent` in addition to the existing `%USERPROFILE%\.hermes\hermes-agent` and `../hermes-agent` candidates. Closes the installer-user-path friction the maintainer flagged in #2783 — users who install hermes-agent via the official Windows installer (which places it under `%LOCALAPPDATA%\hermes\hermes-agent`) or an MSI to `Program Files` no longer need to set `HERMES_WEBUI_AGENT_DIR` explicitly. The not-found error message also restructured to enumerate every searched path, so when discovery fails the user sees exactly where to look. Same `Test-Path (Join-Path $c 'hermes_cli')` validation applies uniformly to all candidates. - **`start.ps1`: native Windows launcher** — PowerShell equivalent of `start.sh` that bypasses `bootstrap.py`'s `ensure_supported_platform()` refusal and invokes `server.py` directly on native Windows. Mirrors `start.sh`'s discovery (load optional `.env` with the same readonly-var filter for `UID`/`GID`/`EUID`/`EGID`/`PPID`, find Python via `HERMES_WEBUI_PYTHON` env → `python3` → `python` → `py`, locate the hermes-agent dir at `%USERPROFILE%\.hermes\hermes-agent` or `../hermes-agent`, prefer the agent's `venv\Scripts\python.exe` if present, set `HERMES_WEBUI_HOST` / `HERMES_WEBUI_PORT` / `HERMES_WEBUI_STATE_DIR` / `HERMES_HOME` defaults). Closes the launcher half of #1952; complements the README community-guide link below. Assumes Python + agent venv are already set up — for first-time setup, use WSL2 once to create the venv, then `start.ps1` works natively. ### Documentation diff --git a/start.ps1 b/start.ps1 index 191db6c1..6631e81d 100644 --- a/start.ps1 +++ b/start.ps1 @@ -98,6 +98,9 @@ if ($AgentDir -and -not (Test-Path (Join-Path $AgentDir 'hermes_cli'))) { if (-not $AgentDir) { $candidates = @( (Join-Path $env:USERPROFILE '.hermes\hermes-agent'), + (Join-Path $env:LOCALAPPDATA 'hermes\hermes-agent'), + (Join-Path ${env:ProgramFiles} 'hermes\hermes-agent'), + (Join-Path ${env:ProgramFiles(x86)} 'hermes\hermes-agent'), (Join-Path (Split-Path -Parent $RepoRoot) 'hermes-agent') ) foreach ($c in $candidates) { @@ -105,9 +108,8 @@ if (-not $AgentDir) { } } if (-not $AgentDir) { - $expectedPrimary = Join-Path $env:USERPROFILE '.hermes\hermes-agent' - $expectedSibling = Join-Path (Split-Path -Parent $RepoRoot) 'hermes-agent' - Write-Error "hermes-agent not found at $expectedPrimary or $expectedSibling. Set HERMES_WEBUI_AGENT_DIR explicitly." + $searched = $candidates -join ', ' + Write-Error "hermes-agent not found. Searched: $searched. Set HERMES_WEBUI_AGENT_DIR explicitly to override." exit 1 }