unity-mcp/MCPForUnity/Editor/Services
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
..
Transport 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
BridgeControlService.cs 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
BridgeControlService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
ClientConfigurationService.cs Fix HTTP/Stdio Transport UX and Test Bug (#530) 2026-01-07 23:33:22 -04:00
ClientConfigurationService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
EditorPrefsWindowService.cs Add EditorPrefs management window for MCP configuration debugging (#491) 2025-12-29 13:30:45 -04:00
EditorPrefsWindowService.cs.meta Add EditorPrefs management window for MCP configuration debugging (#491) 2025-12-29 13:30:45 -04:00
EditorStateCache.cs v9 pre-release pruning (#528) 2026-01-07 18:51:51 -04:00
EditorStateCache.cs.meta Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
HttpBridgeReloadHandler.cs Fix manage prefabs (#405) 2025-11-28 18:47:11 -04:00
HttpBridgeReloadHandler.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IBridgeControlService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IBridgeControlService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
IClientConfigurationService.cs Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
IClientConfigurationService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
IPackageDeploymentService.cs [FEATURE] Deployment of local source code to Unity (#450) 2025-12-09 20:17:18 -05:00
IPackageDeploymentService.cs.meta [FEATURE] Deployment of local source code to Unity (#450) 2025-12-09 20:17:18 -05:00
IPackageUpdateService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IPackageUpdateService.cs.meta Notify users when there's a new version (#329) 2025-10-18 20:42:18 -04:00
IPathResolverService.cs fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
IPathResolverService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
IPlatformService.cs Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
IPlatformService.cs.meta Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
IServerManagementService.cs Fix local HTTP server UI check (#556) 2026-01-14 19:57:17 -08:00
IServerManagementService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
ITestRunnerService.cs Add test filtering to run_tests tool (#462) 2025-12-17 16:59:21 -04:00
ITestRunnerService.cs.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
IToolDiscoveryService.cs Optimise so startup is fast again (#494) 2025-12-29 18:39:03 -04:00
IToolDiscoveryService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPServiceLocator.cs [FEATURE] Deployment of local source code to Unity (#450) 2025-12-09 20:17:18 -05:00
MCPServiceLocator.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
McpEditorShutdownCleanup.cs 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
McpEditorShutdownCleanup.cs.meta 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
PackageDeploymentService.cs Fixes Windows installation failures caused by long path issues when cloning the full repository via git URL (MAX_PATH 260 char limit exceeded by files in TestProjects/). (#534) 2026-01-08 07:14:44 -08:00
PackageDeploymentService.cs.meta [FEATURE] Deployment of local source code to Unity (#450) 2025-12-09 20:17:18 -05:00
PackageUpdateService.cs Fix manage prefabs (#405) 2025-11-28 18:47:11 -04:00
PackageUpdateService.cs.meta Notify users when there's a new version (#329) 2025-10-18 20:42:18 -04:00
PathResolverService.cs fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
PathResolverService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
PlatformService.cs Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
PlatformService.cs.meta Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
ServerManagementService.cs Fix local HTTP server UI check (#556) 2026-01-14 19:57:17 -08:00
ServerManagementService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
StdioBridgeReloadHandler.cs Fix HTTP/Stdio Transport UX and Test Bug (#530) 2026-01-07 23:33:22 -04:00
StdioBridgeReloadHandler.cs.meta Fix stdio reloads (#402) 2025-11-27 19:33:26 -04:00
TestJobManager.cs Fix PlayMode tests stalling when unfocused (python refresh utility), improve domain reload recovery and refresh tool (#554) 2026-01-14 15:02:40 -08:00
TestJobManager.cs.meta Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
TestRunStatus.cs Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
TestRunStatus.cs.meta Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
TestRunnerNoThrottle.cs Fix PlayMode tests stalling when unfocused (python refresh utility), improve domain reload recovery and refresh tool (#554) 2026-01-14 15:02:40 -08:00
TestRunnerNoThrottle.cs.meta Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
TestRunnerService.cs Fix PlayMode tests stalling when unfocused (python refresh utility), improve domain reload recovery and refresh tool (#554) 2026-01-14 15:02:40 -08:00
TestRunnerService.cs.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
ToolDiscoveryService.cs Optimise so startup is fast again (#494) 2025-12-29 18:39:03 -04:00
ToolDiscoveryService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Transport.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00