Ban 'latest' as a reserved version string (#413)

## Summary
- Adds validation to prevent servers from being published with version
string "latest"
- "latest" is now a reserved keyword that cannot be used as a version
string

## Implementation
- Added `ErrReservedVersionString` error constant
- Created `validateVersion` function to check for reserved version
strings
- Integrated validation into the package field validation flow
- Added comprehensive test coverage

---

This is so we can potentially support things like
https://github.com/modelcontextprotocol/registry/discussions/333 in
future more easily, as I imagine we might want to.
This commit is contained in:
adam jones 2025-09-10 10:52:08 -07:00 • committed by GitHub
commit 41aacc1846
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,7 @@ var (
// Package validation errors
ErrPackageNameHasSpaces = errors.New("package name cannot contain spaces")
ErrReservedVersionString = errors.New("version string 'latest' is reserved and cannot be used")
// Remote validation errors
ErrInvalidRemoteURL = errors.New("invalid remote URL")