registries

package
v1.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingIdentifierForMCPB = fmt.Errorf("package identifier is required for MCPB packages")
	ErrMissingFileSHA256ForMCPB = fmt.Errorf("must include a fileSha256 hash for integrity verification")
)
View Source
var (
	ErrMissingIdentifierForNPM = errors.New("package identifier is required for NPM packages")
	ErrMissingVersionForNPM    = errors.New("package version is required for NPM packages")
)
View Source
var (
	ErrMissingIdentifierForNuget = errors.New("package identifier is required for NuGet packages")
	ErrMissingVersionForNuget    = errors.New("package version is required for NuGet packages")
)
View Source
var (
	ErrMissingIdentifierForOCI = errors.New("package identifier is required for OCI packages")
	ErrUnsupportedRegistry     = errors.New("unsupported OCI registry")
)
View Source
var (
	ErrMissingIdentifierForPyPI = errors.New("package identifier is required for PyPI packages")
	ErrMissingVersionForPyPi    = errors.New("package version is required for PyPI packages")
)
View Source
var ErrRateLimited = errors.New("rate limited by registry")

ErrRateLimited is returned when a registry rate limits our requests

Functions

func ValidateMCPB

func ValidateMCPB(ctx context.Context, pkg model.Package, _ string) error

func ValidateNPM

func ValidateNPM(ctx context.Context, pkg model.Package, serverName string) error

ValidateNPM validates that an NPM package contains the correct MCP server name

func ValidateNuGet

func ValidateNuGet(ctx context.Context, pkg model.Package, serverName string) error

ValidateNuGet validates that a NuGet package contains the correct MCP server name

func ValidateOCI

func ValidateOCI(ctx context.Context, pkg model.Package, serverName string) error

ValidateOCI validates that an OCI image contains the correct MCP server name annotation. Supports canonical OCI references including:

  • registry/namespace/image:tag
  • registry/namespace/image@sha256:digest
  • registry/namespace/image:tag@sha256:digest
  • namespace/image:tag (defaults to docker.io)

Supported registries:

  • Docker Hub (docker.io)
  • GitHub Container Registry (ghcr.io)
  • Google Artifact Registry (*.pkg.dev)

func ValidatePyPI

func ValidatePyPI(ctx context.Context, pkg model.Package, serverName string) error

ValidatePyPI validates that a PyPI package contains the correct MCP server name

Types

type NPMPackageResponse

type NPMPackageResponse struct {
	MCPName string `json:"mcpName"`
}

NPMPackageResponse represents the structure returned by the NPM registry API

type PyPIPackageResponse

type PyPIPackageResponse struct {
	Info struct {
		Description string `json:"description"`
	} `json:"info"`
}

PyPIPackageResponse represents the structure returned by the PyPI JSON API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL