Commit a58afca
authored
Update dependencies and enhance secure environment management (#12)
* Update dependencies and enhance secure environment management
- Bump `github.com/mark3labs/mcp-go` dependency to v0.33.0.
- Introduce `PathDiscovery` struct for managing discovered paths of common tools.
- Implement path discovery methods for macOS, Windows, and Unix systems.
- Enhance `Manager` to utilize discovered paths for building a comprehensive environment variable list.
- Improve error handling and logging in the `Connect` method of the client.
* Enhance secure environment PATH management
- Update BuildSecureEnvironment method to conditionally enhance PATH based on InheritSystemSafe configuration.
- Modify integration tests to assert inclusion of system paths in the enhanced PATH and ensure at least two safe system variables are filtered through.
* Enhance tests for secure environment PATH validation
- Update TestBuildSecureEnvironment to assert inclusion of system paths in the enhanced PATH using assert.Contains.
- Improve TestRealWorldNpxScenario to verify enhanced path discovery for executables, providing clearer error messages.
* Enhance platform-specific environment setup in tests
- Update TestBuildSecureEnvironment and TestSecureEnvironmentIntegration to conditionally set PATH and HOME based on the operating system.
- Improve TestGetSystemEnvVar and TestRealWorldNpxScenario to reflect platform-specific paths for better test accuracy.
- Ensure consistent handling of environment variables across different OS environments.
* Refactor path discovery for macOS in Manager and AutostartManager
- Update path patterns for Node.js, Python, Rust, and Go to use a more consistent format with slashes.
- Modify discoverEnvironmentPaths method to improve clarity with named return values.
- Enhance environment variable setting in buildEnvironmentSetupScript for better readability.1 parent cdfb6e9 commit a58afca
8 files changed
Lines changed: 549 additions & 54 deletions
File tree
- internal
- secureenv
- tray
- upstream
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
0 commit comments