Documentation
¶
Index ¶
- Constants
- Variables
- func Connect(ctx context.Context, dao db.DAO, cwd string, config Config, vendor string, ...) error
- func ConnectCodex(_ context.Context, workingSet string) error
- func ConnectGordon(ctx context.Context, workingSet string) error
- func Disconnect(ctx context.Context, cwd string, config Config, vendor string, global bool) error
- func DisconnectCodex(_ context.Context) error
- func DisconnectGordon(ctx context.Context) error
- func FindClientsByProfile(ctx context.Context, profileID string) map[string]any
- func FindGitProjectRoot(dir string) string
- func GetSupportedMCPClients(cfg Config) []string
- func IsSupportedMCPClient(cfg Config, vendor string, global bool) bool
- func ReadGordonProfile() (string, error)
- type CfgError
- type Config
- type ErrVendorNotFound
- type FileConfig
- type GlobalCfgProcessor
- type LocalCfgProcessor
- type MCPClientCfg
- type MCPClientCfgBase
- type MCPJSONLists
- type MCPServerConfig
- type MCPServerHTTP
- type MCPServerSSE
- type MCPServerSTDIO
- type Paths
- type PreprocessFunc
- type ProfilesFile
- type ProjectMCPClientCfg
- type Updater
- type YQ
Constants ¶
View Source
const ( VendorGordon = "gordon" VendorCodex = "codex" )
View Source
const (
DockerMCPCatalog = "MCP_DOCKER"
)
Variables ¶
View Source
var ErrCodexOnlySupportsGlobalConfiguration = errors.New("codex only supports global configuration. Re-run with --global or -g")
View Source
var (
ErrNotInGitRepo = errors.New("could not find root project root (use --global flag to update global configuration)")
)
Functions ¶
func ConnectCodex ¶
ConnectCodex configures docker mcp gateway in Codex by editing config.toml
func Disconnect ¶
func DisconnectCodex ¶
DisconnectCodex removes docker mcp gateway from Codex by editing config.toml
func DisconnectGordon ¶
func FindClientsByProfile ¶
func FindGitProjectRoot ¶
func GetSupportedMCPClients ¶
func ReadGordonProfile ¶ added in v0.31.0
Types ¶
type Config ¶
type Config struct {
System map[string]globalCfg `yaml:"system"`
Project map[string]localCfg `yaml:"project"`
}
func ReadConfig ¶
func ReadConfig() *Config
type ErrVendorNotFound ¶
type ErrVendorNotFound struct {
// contains filtered or unexported fields
}
func (*ErrVendorNotFound) Error ¶
func (e *ErrVendorNotFound) Error() string
type FileConfig ¶ added in v0.31.0
type FileConfig struct {
Profile string `json:"profile"`
}
type GlobalCfgProcessor ¶
type GlobalCfgProcessor struct {
// contains filtered or unexported fields
}
func NewGlobalCfgProcessor ¶
func NewGlobalCfgProcessor(g globalCfg) (*GlobalCfgProcessor, error)
func (*GlobalCfgProcessor) GetPathsForCurrentOS ¶
func (c *GlobalCfgProcessor) GetPathsForCurrentOS() []string
func (*GlobalCfgProcessor) ParseConfig ¶
func (c *GlobalCfgProcessor) ParseConfig() MCPClientCfg
func (*GlobalCfgProcessor) Update ¶
func (c *GlobalCfgProcessor) Update(key string, server *MCPServerSTDIO) error
type LocalCfgProcessor ¶
type LocalCfgProcessor struct {
// contains filtered or unexported fields
}
func NewLocalCfgProcessor ¶
func NewLocalCfgProcessor(cfg localCfg, projectRoot string) (*LocalCfgProcessor, error)
func (*LocalCfgProcessor) Parse ¶
func (c *LocalCfgProcessor) Parse() ProjectMCPClientCfg
func (*LocalCfgProcessor) Update ¶
func (c *LocalCfgProcessor) Update(key string, server *MCPServerSTDIO) error
type MCPClientCfg ¶
type MCPClientCfg struct {
MCPClientCfgBase
IsInstalled bool `json:"isInstalled"`
IsOsSupported bool `json:"isOsSupported"`
}
func GetCodexSetup ¶
func GetCodexSetup(ctx context.Context) MCPClientCfg
GetCodexSetup returns the configuration status for Codex
func GetGordonSetup ¶
func GetGordonSetup(ctx context.Context) MCPClientCfg
type MCPClientCfgBase ¶
type MCPClientCfgBase struct {
DisplayName string `json:"displayName"`
Source string `json:"source"`
Icon string `json:"icon"`
ConfigName string `json:"configName"`
IsMCPCatalogConnected bool `json:"dockerMCPCatalogConnected"`
WorkingSet string `json:"profile"`
Err *CfgError `json:"error"`
Cfg *MCPJSONLists
}
type MCPJSONLists ¶
type MCPJSONLists struct {
STDIOServers []MCPServerSTDIO
SSEServers []MCPServerSSE
HTTPServers []MCPServerHTTP
}
func UnmarshalMCPJSONList ¶
func UnmarshalMCPJSONList(data []byte) (*MCPJSONLists, error)
type MCPServerConfig ¶
MCPServerConfig represents the structure of an MCP server in config.toml
type MCPServerHTTP ¶
type MCPServerHTTP struct {
Name string `json:"name"`
URL string `json:"url"`
Headers map[string]string `json:"headers"`
}
func (*MCPServerHTTP) String ¶
func (c *MCPServerHTTP) String() string
type MCPServerSSE ¶
type MCPServerSSE struct {
Name string `json:"name"`
URL string `json:"url"`
Headers map[string]string `json:"headers"`
}
func (*MCPServerSSE) String ¶
func (c *MCPServerSSE) String() string
type MCPServerSTDIO ¶
type MCPServerSTDIO struct {
Name string `json:"name,omitempty"`
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
func (*MCPServerSTDIO) GetWorkingSet ¶
func (c *MCPServerSTDIO) GetWorkingSet() string
func (*MCPServerSTDIO) String ¶
func (c *MCPServerSTDIO) String() string
type PreprocessFunc ¶
type ProfilesFile ¶ added in v0.31.0
type ProfilesFile = map[string]FileConfig
Currently only used for Gordon.
type ProjectMCPClientCfg ¶
type ProjectMCPClientCfg struct {
MCPClientCfgBase
IsConfigured bool `json:"isConfigured"`
}
type Updater ¶
type Updater func(key string, server *MCPServerSTDIO) error
Click to show internal directories.
Click to hide internal directories.