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

Function classifyConfigMutationPath

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

Source from the content-addressed store, hash-verified

1581}
1582
1583func classifyConfigMutationPath(path []string) (configSetValueKind, bool, error) {
1584 joined := strings.Join(path, ".")
1585 if kind, ok := configScalarMutationKinds[joined]; ok {
1586 return kind, false, nil
1587 }
1588 if len(path) == 3 && path[0] == configProvidersKey && path[2] == configSessionMCPKey {
1589 return configSetBool, false, nil
1590 }
1591 if len(path) == 5 &&
1592 path[0] == configProvidersKey &&
1593 path[2] == configModelsKey &&
1594 path[3] == configDiscoveryKey &&
1595 path[4] == configEnabledKey {
1596 return configSetBool, false, nil
1597 }
1598 if isProviderMutationPath(path) {
1599 return configSetString, false, nil
1600 }
1601 if kind, redacted, ok := classifySandboxMutationPath(path); ok {
1602 return kind, redacted, nil
1603 }
1604
1605 return configSetString, false, fmt.Errorf("cli: config path %q is not supported by config set", joined)
1606}
1607
1608func classifyConfigSetLifecycle(path []string) (configMutationLifecycle, error) {
1609 field := strings.Join(path, ".")

Callers 1

configMutationPathFunction · 0.85

Calls 2

isProviderMutationPathFunction · 0.85

Tested by

no test coverage detected