Documentation
¶
Index ¶
- func DescribeProviderField(cfg *config.Config, provider, field string) (string, error)
- func ProviderKeys() []string
- func Run(opts Options) error
- func RunDisable(opts DisableOptions) error
- func SetProviderField(cfg *config.Config, provider, field, value string) error
- type Agent
- type DisableOptions
- type MCPConfigTarget
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribeProviderField ¶ added in v0.1.12
DescribeProviderField returns a print-ready value for `codag config get <provider>.<field>`: secret fields are masked, host/org are shown in full, and an unset field renders as "(unset)". Validates provider and field.
func ProviderKeys ¶ added in v0.1.12
func ProviderKeys() []string
ProviderKeys returns the sorted list of known provider keys, for error messages and help text.
func RunDisable ¶
func RunDisable(opts DisableOptions) error
RunDisable unregisters codag's MCP server from known agent config files. It does not remove auth tokens, provider config, or the codag binary.
func SetProviderField ¶ added in v0.1.12
SetProviderField sets one credential field (e.g. provider "datadog", field "api_key") on cfg.Providers, validating both the provider key and the field name. It mutates cfg in place but does NOT persist — the caller saves via config.Save.
Types ¶
type Agent ¶
type Agent struct {
Name string // human-readable
LocationHint string // where we found it (CLI on PATH, config dir, etc.)
RegisterMethod string // describe the path we'll take
Register func(codagBin string) error
}
Agent is one MCP-aware agent we know how to register codag with.
type DisableOptions ¶
type DisableOptions struct {
PrintOnly bool
}
type MCPConfigTarget ¶
MCPConfigTarget is one known agent config file that may contain a codag MCP server entry. Used by `codag disable`.