Compose reusable configuration rules at the PromptKit path

This commit is contained in:
2026-11-21 14:18:15 +00:00
parent 76c8789e65
commit 34c0cf3f14
7 changed files with 207 additions and 88 deletions

View File

@@ -48,12 +48,17 @@ func Diff(left, right Inspection) ([]configkit.Difference, error) {
return configkit.Diff(leftResult, rightResult)
}
func secretProviderPath(path configkit.Path) bool {
// Sensitive marks credential-shaped provider values beneath PromptKit settings.
func Sensitive(path configkit.Path) bool {
pointer := path.String()
if pointer == "" {
return false
}
parts := strings.Split(strings.TrimPrefix(pointer, "/"), "/")
if len(parts) == 0 || parts[0] != "promptkit" {
return false
}
parts = parts[1:]
if !providerExtraParamsPath(parts) {
return false
}