Reserve Promptkit catalog profile names

This commit is contained in:
2026-09-22 12:17:41 +00:00
parent 02fd09955d
commit 4c3828857c
4 changed files with 42 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ func Load(sources ...Source) (Set, error) {
}
resolvingRepository := profile.NewResolvingRepository(repository)
for _, entry := range metadata {
if strings.HasPrefix(entry.ID, "promptkit-") {
return Set{}, fmt.Errorf("catalog %s: %s uses the reserved promptkit- profile ID prefix", source.Name, entry.Path)
}
if profileIDs[entry.ID] {
return Set{}, fmt.Errorf("catalog %s: %s duplicates an earlier profile ID", source.Name, entry.Path)
}