Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
24 lines
696 B
Go
24 lines
696 B
Go
package providerregistry
|
|
|
|
import (
|
|
"regexp"
|
|
"strings"
|
|
)
|
|
|
|
var openProviderIDPattern = regexp.MustCompile(`^[a-z][a-z0-9._:-]{0,127}$`)
|
|
|
|
// NormalizeOpenProviderID preserves registered-provider alias handling while
|
|
// accepting extension-owned provider identities such as acp:gemini. The
|
|
// normalized identity is metadata only; callers must still resolve an
|
|
// authoritative Agent Target before launching an extension runtime.
|
|
func NormalizeOpenProviderID(value string) (string, bool) {
|
|
if providerID, ok := ResolveProviderID(value); ok {
|
|
return providerID, true
|
|
}
|
|
value = strings.TrimSpace(value)
|
|
if !openProviderIDPattern.MatchString(value) {
|
|
return "", false
|
|
}
|
|
return value, true
|
|
}
|