bastion 0.54.0
ci / personal-data (push) Successful in 4s
ci / fuzz (push) Successful in 2m44s
ci / test (push) Successful in 2m11s

This commit is contained in:
Privatae
2026-10-21 22:29:10 +00:00
parent e4c9b69b46
commit d62da8adb4
58 changed files with 6944 additions and 124 deletions
+32
View File
@@ -0,0 +1,32 @@
//go:build darwin
package main
import (
"os"
"path/filepath"
)
// The accounts whose agent clients mcpconfig.go reads on macOS: the service's
// own home and every directory under /Users except Shared. The per-user
// configuration directory is ~/Library/Application Support.
func mcpHomes() ([]mcpHome, bool) {
var homes []string
if h, err := os.UserHomeDir(); err == nil && h != "" {
homes = append(homes, h)
}
if entries, err := os.ReadDir("/Users"); err == nil {
for _, e := range entries {
if e.IsDir() && e.Name() != "Shared" && e.Name()[0] != '.' {
homes = append(homes, filepath.Join("/Users", e.Name()))
}
}
}
var out []mcpHome
for _, h := range dedupeStrings(homes) {
out = append(out, mcpHome{Dir: h, ConfigDir: filepath.Join(h, "Library", "Application Support")})
}
return out, true
}
func mcpSystemFiles() []mcpSource { return mcpSystemSources("darwin", "") }