MCPcopy Create free account
hub / github.com/compozy/agh / isProviderMutationPath

Function isProviderMutationPath

internal/cli/config.go:1683–1713  ·  view source on GitHub ↗
(path []string)

Source from the content-addressed store, hash-verified

1681const configPathSandboxes = "sandboxes"
1682
1683func isProviderMutationPath(path []string) bool {
1684 if len(path) == 3 && path[0] == configProvidersKey {
1685 switch path[2] {
1686 case configCommandKey,
1687 providerAuthModeKey,
1688 "env_policy",
1689 "home_policy",
1690 "runtime_provider",
1691 "transport",
1692 "base_url",
1693 "auth_status_command",
1694 "auth_login_command":
1695 return true
1696 }
1697 }
1698 if len(path) == 4 && path[0] == configProvidersKey && path[2] == configModelsKey {
1699 if path[3] == configDefaultKey {
1700 return true
1701 }
1702 }
1703 if len(path) == 5 &&
1704 path[0] == configProvidersKey &&
1705 path[2] == configModelsKey &&
1706 path[3] == configDiscoveryKey {
1707 switch path[4] {
1708 case configCommandKey, "endpoint", "timeout":
1709 return true
1710 }
1711 }
1712 return false
1713}
1714
1715func classifySandboxMutationPath(path []string) (configSetValueKind, bool, bool) {
1716 if len(path) == 4 && path[0] == configPathSandboxes {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected