Documentation
¶
Overview ¶
Package connector is Agentry's catalogue of connectors: the vendors' MCP servers Agentry has vetted, each bound to the app Agentry registered with that vendor. A token minted under one of Agentry's apps must reach only a server Agentry has vetted, because the app is the deployment's identity at the vendor: a release whose server merely names the vendor's authorization server would otherwise receive a grant made in Agentry's name.
Matching is implicit. A release names no connector: a declared server that is one of a connector's servers, signed in to at the connector's issuer, gets the connector's app, and every other server gets the person's own client, a client document or dynamic registration, never Agentry's app. A remote server matches a listed address when it has the same host over https, no user information, and the same path or a path under it. A package server matches a listed package only with the same ecosystem, name and exact version and the very same oauth block (issuer, scopes, files and environment), so a release that changes any of them is not vetted.
The catalogue is embedded data (catalogue.yaml), released with the core. It holds no client id and no secret: the deployment configures those, and a connector's public client id is the only one the registry hands to a client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalogue ¶
type Catalogue struct {
// contains filtered or unexported fields
}
Catalogue is a validated list of connectors.
func Parse ¶
Parse reads and validates a catalogue: unknown fields, a repeated or malformed id, an unknown strategy, a server that is neither or both a remote address and a package, an address that is not plain https, a package without an exact version or whose oauth block names another issuer, and servers without an issuer are refused.
type Connector ¶
type Connector struct {
// ID names it in configuration and to clients: lowercase letters,
// digits and hyphens.
ID string `yaml:"id" json:"id"`
// Vendor and Name are the company and the product, as people know
// them.
Vendor string `yaml:"vendor" json:"vendor"`
Name string `yaml:"name" json:"name"`
// Strategy is how its app signs a person in.
Strategy Strategy `yaml:"strategy" json:"strategy"`
// Issuer is the vendor's authorization server, as its metadata names
// itself; empty only for an entry that lists no servers yet.
Issuer string `yaml:"issuer,omitempty" json:"issuer,omitempty"`
// GrantURL, where set, is how the vendor revokes a grant when its
// metadata offers no revocation endpoint, {client_id} replaced.
GrantURL string `yaml:"grantURL,omitempty" json:"grantURL,omitempty"`
// Servers are what it vets; none vets nothing.
Servers []Server `yaml:"servers,omitempty" json:"servers,omitempty"`
}
Connector is one vendor product Agentry has vetted servers of.
func (Connector) HasPublicClient ¶
HasPublicClient reports whether a deployment may configure a public client id for the connector, which the registry then serves.
type Ecosystem ¶
type Ecosystem string
Ecosystem is the package registry a package server is installed from.
type Package ¶
type Package struct {
Ecosystem Ecosystem `yaml:"ecosystem" json:"ecosystem"`
Name string `yaml:"name" json:"name"`
// Version is exact: a newer version is not vetted until it is listed.
Version string `yaml:"version" json:"version"`
// OAuth is the whole oauth block a release must declare.
OAuth manifest.MCPOAuth `yaml:"oauth" json:"oauth"`
}
Package is a vetted package server.
type Server ¶
type Server struct {
// Remote is a vendor's https address: it and the addresses under it
// match.
Remote string `yaml:"remote,omitempty" json:"remote,omitempty"`
// Package is one package at one version with one oauth block.
Package *Package `yaml:"package,omitempty" json:"package,omitempty"`
}
Server is one vetted server: a remote address, or a package.
type Strategy ¶
type Strategy string
Strategy is how a connector's app signs a person in.
const ( // StrategyAgentryConfidential is Agentry's web client, whose secret // stays with the deployment. StrategyAgentryConfidential Strategy = "agentry-confidential" // StrategyAgentryPublic is a public client id with no secret, which // the registry serves to clients from the deployment's configuration, // with Agentry's web client for hosted sign-ins. StrategyAgentryPublic Strategy = "agentry-public" )