unity-mcp/MCPForUnity/Editor
whatevertogo 322a3d1846
fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550
* fix: resolve UV path override not being detected in System Requirements

Fixes #538

The System Requirements panel showed "UV Package Manager: Not Found" even
when a valid UV path override was configured in Advanced Settings.

Root cause: PlatformDetectorBase.DetectUv() only searched PATH with bare
command names ("uvx", "uv") and never consulted PathResolverService which
respects the user's override setting.

Changes:
- Refactor DetectUv() to use PathResolverService.GetUvxPath() which checks
  override path first, then system PATH, then falls back to "uvx"
- Add TryValidateUvExecutable() to verify executables by running --version
  instead of just checking File.Exists
- Prioritize PATH environment variable in EnumerateUvxCandidates() for
  better compatibility with official uv install scripts
- Fix process output read order (ReadToEnd before WaitForExit) to prevent
  potential deadlocks

Co-Authored-By: ChatGLM 4.7 <noreply@zhipuai.com>

* fix: improve uv/uvx detection robustness on macOS and Linux

- Read both stdout and stderr when validating uv/uvx executables
- Respect WaitForExit timeout return value instead of ignoring it
- Fix version parsing to handle extra tokens like "(Homebrew 2025-01-01)"
- Resolve bare commands ("uv"/"uvx") to absolute paths after validation
- Rename FindExecutableInPath to FindUvxExecutableInPath for clarity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: unify process execution with ExecPath.TryRun and add Windows PATH augmentation

Replace direct Process.Start calls with ExecPath.TryRun across all platform detectors.
This change:
- Fixes potential deadlocks by using async output reading
- Adds proper timeout handling with process termination
- Removes redundant fallback logic and simplifies version parsing
- Adds Windows PATH augmentation with common uv, npm, and Python installation paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: improve version parsing to handle both spaces and parentheses

The version extraction logic now properly handles outputs like:
- "uvx 0.9.18" -> "0.9.18"
- "uvx 0.9.18 (hash date)" -> "0.9.18"
- "uvx 0.9.18 extra info" -> "0.9.18"

Uses Math.Min to find the first occurrence of either space or parenthesis.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: improve platform detectors with absolute path resolution

- Add absolute path resolution in TryValidatePython and TryValidateUvWithPath for better UI display
- Fix BuildAugmentedPath to avoid PATH duplication
- Add comprehensive comments for version parsing logic
- Ensure cross-platform consistency across all three detectors
- Fix override path validation logic with clear state handling
- Fix platform detector path resolution and Python version detection
- Use UserProfile consistently in GetClaudeCliPath instead of Personal
- All platforms now use protected BuildAugmentedPath method

This change improves user experience by displaying full paths in the UI
while maintaining robust fallback behavior if path resolution fails.

Co-Authored-By: GLM4.7 <noreply@zhipuai.com>

* fix: improve error handling in PathResolverService by logging exceptions

* Remove .meta files added after fork and update .gitignore

* Update .gitignore

* save .meta

* refactor: unify uv/uvx naming and path detection across platforms

- Rename TryValidateUvExecutable -> TryValidateUvxExecutable for consistency
- Add cross-platform FindInPath() helper in ExecPath.cs
- Remove platform-specific where/which implementations in favor of unified helper
- Add Windows-specific DetectUv() override with enhanced uv/uvx detection
- Add WinGet shim path support for Windows uvx installation
- Update UI labels: "UV Path" -> "UVX Path"
- Only show uvx path status when override is configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: improve validation light(uvxPathStatus) logic for UVX path overrides and system paths

* refactor: streamline UV version validation and unify path detection methods across platform detectors

* fix: add type handling for Claude Code client in config JSON builder

* fix: correct command from 'uvx' to 'uv' for Python version listing in WindowsPlatformDetector

* feat: add uvx path fallback with warning UI

  - When override path is invalid, automatically fall back to system path
  - Add HasUvxPathFallback flag to track fallback state
  - Show yellow warning indicator when using fallback
  - Display clear messages for invalid override paths
  - Updated all platform detectors (Windows, macOS, Linux) to support fallback logic

* refactor: remove GetDetails method from PlatformDetectorBase

* Update ExecPath.cs

update Windows Path lookup

---------

Co-authored-by: ChatGLM 4.7 <noreply@zhipuai.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Shutong Wu <51266340+Scriptwonder@users.noreply.github.com>
2026-01-17 18:34:40 -05:00
..
Clients fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
Constants HTTP setup overhaul: transport selection (HTTP local/remote vs stdio), safer lifecycle, cleaner UI, better Claude Code integration (#499) 2026-01-01 17:08:51 -08:00
Dependencies fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
External Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Helpers fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
MenuItems v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
Migrations Improve legacy configuration migration error handling and cleanup (#470) 2025-12-19 18:30:42 -04:00
Models Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
Resources v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
Services fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
Setup v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
Tools Remove unnecessary allowNudge guard from PR #558 2026-01-14 23:12:52 -08:00
Windows fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
AssemblyInfo.cs Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
AssemblyInfo.cs.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Clients.meta Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
Constants.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Dependencies.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
External.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Helpers.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
MCPForUnity.Editor.asmdef Replace asmdef GUID references (#564) 2026-01-15 07:52:53 -08:00
MCPForUnity.Editor.asmdef.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
McpCiBoot.cs Unity MCP CI Test Improvements (#452) 2025-12-10 14:54:55 -08:00
McpCiBoot.cs.meta Add .meta files (#472) 2025-12-19 18:59:19 -04:00
MenuItems.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Migrations.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Models.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Resources.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
Services.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
Setup.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Tools.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Windows.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00