Skip to content

Commit a58afca

Browse files
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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/blevesearch/bleve/v2 v2.5.2
1010
github.com/fsnotify/fsnotify v1.8.0
1111
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
12-
github.com/mark3labs/mcp-go v0.32.0
12+
github.com/mark3labs/mcp-go v0.33.0
1313
github.com/spf13/cobra v1.9.1
1414
github.com/spf13/viper v1.20.1
1515
github.com/stretchr/testify v1.10.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
7575
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
7676
github.com/mark3labs/mcp-go v0.32.0 h1:fgwmbfL2gbd67obg57OfV2Dnrhs1HtSdlY/i5fn7MU8=
7777
github.com/mark3labs/mcp-go v0.32.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
78+
github.com/mark3labs/mcp-go v0.33.0 h1:naxhjnTIs/tyPZmWUZFuG0lDmdA6sUyYGGf3gsHvTCc=
79+
github.com/mark3labs/mcp-go v0.33.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
7880
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
7981
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
8082
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=

0 commit comments

Comments
 (0)