Documentation
¶
Index ¶
Constants ¶
const ( GitHubReleasesURL = "https://github.com/genmcp/gen-mcp/releases/download" GitHubAPIURL = "https://api.github.com/repos/genmcp/gen-mcp/releases/latest" CacheKeepVersionsCount = 3 // Number of versions to keep per platform in cache )
const ( CertificateIdentityRegexp = "https://github.com/genmcp/gen-mcp/.*" CertificateOIDCIssuer = "https://token.actions.githubusercontent.com" )
Variables ¶
This section is empty.
Functions ¶
func AppendServerConfigSchemaHeader ¶ added in v0.2.0
AppendServerConfigSchemaHeader appends the schema header for server config files
func AppendToolDefinitionsSchemaHeader ¶ added in v0.2.0
AppendToolDefinitionsSchemaHeader appends the schema header for MCP files
func GetCacheDir ¶
Types ¶
type BinaryCache ¶ added in v0.2.0
type BinaryCache struct {
// contains filtered or unexported fields
}
BinaryCache manages cached server binaries
func NewBinaryCache ¶ added in v0.2.0
func NewBinaryCache() (*BinaryCache, error)
NewBinaryCache creates a new binary cache manager using the default cache directory
func NewBinaryCacheWithDir ¶ added in v0.2.0
func NewBinaryCacheWithDir(cacheDir string) (*BinaryCache, error)
NewBinaryCacheWithDir creates a new binary cache manager with a custom cache directory
func (*BinaryCache) Add ¶ added in v0.2.0
func (bc *BinaryCache) Add(version, platform, sourcePath string) (string, error)
Add adds a binary zip file to the cache
func (*BinaryCache) Clean ¶ added in v0.2.0
func (bc *BinaryCache) Clean(keepVersions int) error
Clean removes old cached binaries (keeps last N versions)
func (*BinaryCache) Get ¶ added in v0.2.0
func (bc *BinaryCache) Get(version, platform string) (string, bool)
Get retrieves a cached binary path for a version and platform
func (*BinaryCache) GetLatestCached ¶ added in v0.2.0
func (bc *BinaryCache) GetLatestCached(platform string) (string, string)
GetLatestCached returns the most recently cached version for a platform
type BinaryCacheEntry ¶ added in v0.2.0
type BinaryCacheEntry struct {
Version string `json:"version"`
Platform string `json:"platform"` // e.g., "linux-amd64"
ZipPath string `json:"zip_path"` // absolute path to verified zip file
SHA256 string `json:"sha256"` // checksum of zip file
DownloadedAt string `json:"downloaded_at"` // timestamp
}
BinaryCacheEntry represents a cached binary
type BinaryDownloader ¶ added in v0.2.0
type BinaryDownloader struct {
// contains filtered or unexported fields
}
BinaryDownloader handles downloading server binaries from GitHub releases
func NewBinaryDownloader ¶ added in v0.2.0
func NewBinaryDownloader(verbose bool) (*BinaryDownloader, error)
NewBinaryDownloader creates a new binary downloader
func (*BinaryDownloader) CleanOldBinaries ¶ added in v0.2.0
func (bd *BinaryDownloader) CleanOldBinaries(keepVersions int) error
CleanOldBinaries removes old cached binaries (keeps last N versions)
func (*BinaryDownloader) GetBinary ¶ added in v0.2.0
func (bd *BinaryDownloader) GetBinary(version, goos, goarch string) (string, error)
GetBinary retrieves a server binary for the specified version and platform Returns the path to the binary file
func (*BinaryDownloader) GetCurrentBinary ¶ added in v0.2.0
func (bd *BinaryDownloader) GetCurrentBinary(version string) (string, error)
GetCurrentBinary gets the binary for the current platform and a specific version
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
func GetProcessManager ¶
func GetProcessManager() *ProcessManager
func (*ProcessManager) DeleteProcessId ¶
func (pm *ProcessManager) DeleteProcessId(name string) error
func (*ProcessManager) GetProcessId ¶
func (pm *ProcessManager) GetProcessId(name string) (int, error)
func (*ProcessManager) SaveProcessId ¶
func (pm *ProcessManager) SaveProcessId(name string, pid int) error
type SigstoreVerifier ¶ added in v0.2.0
type SigstoreVerifier struct {
// contains filtered or unexported fields
}
SigstoreVerifier verifies binaries using sigstore-go library
func NewSigstoreVerifier ¶ added in v0.2.0
func NewSigstoreVerifier() (*SigstoreVerifier, error)
NewSigstoreVerifier creates a new sigstore verifier using the public good instance
func (*SigstoreVerifier) VerifyBlob ¶ added in v0.2.0
func (sv *SigstoreVerifier) VerifyBlob(blobPath, bundlePath string) error
VerifyBlob verifies a blob (file) using a sigstore bundle