Documentation
¶
Index ¶
- func GetPersonalConfigPath(projectPath string) string
- func IsValidKey(key string) bool
- func ResolveAgentEnv() map[string]string
- type AgentConfig
- type Config
- func (c *Config) CreateProfile(name string, agent *AgentConfig) error
- func (c *Config) DeleteProfile(name string) error
- func (c *Config) GetActiveProfile() string
- func (c *Config) GetProfile(name string) (*AgentConfig, error)
- func (c *Config) HasProfiles() bool
- func (c *Config) HasSensitiveValues() bool
- func (c *Config) ListProfiles() []string
- func (c *Config) ProfileExists(name string) bool
- func (c *Config) Save() error
- func (c *Config) SetActiveProfile(name string) error
- type ConfigKeyDef
- type ConfigKeyType
- type ConfigScope
- type PersonalConfig
- type ResolvedConfig
- type ResolvedValue
- type SchemaRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPersonalConfigPath ¶ added in v1.0.34
func IsValidKey ¶ added in v1.0.34
func ResolveAgentEnv ¶ added in v1.0.34
Types ¶
type AgentConfig ¶ added in v1.0.34
type AgentConfig struct {
BaseURL string `yaml:"base-url" json:"base_url"`
AuthToken string `yaml:"auth-token" json:"auth_token" sensitive:"true"`
APIKey string `yaml:"api-key" json:"api_key" sensitive:"true"`
Model string `yaml:"model" json:"model"`
ModelSonnet string `yaml:"model.sonnet" json:"model_sonnet"`
ModelOpus string `yaml:"model.opus" json:"model_opus"`
ModelHaiku string `yaml:"model.haiku" json:"model_haiku"`
SubagentModel string `yaml:"subagent-model" json:"subagent_model"`
Provider string `yaml:"provider" json:"provider"`
PermissionMode string `yaml:"permission-mode" json:"permission_mode"`
SkipPermissions bool `yaml:"skip-permissions" json:"skip_permissions"`
Effort string `yaml:"effort" json:"effort"`
AllowedTools []string `yaml:"allowed-tools" json:"allowed_tools"`
Env map[string]string `yaml:"env" json:"env"`
}
func DefaultAgentConfig ¶ added in v1.0.34
func DefaultAgentConfig() *AgentConfig
type Config ¶
type Config struct {
DefaultProjectDir string `yaml:"default_project_dir" json:"default_project_dir"`
PreferredShell string `yaml:"preferred_shell" json:"preferred_shell"`
TUIEnabled bool `yaml:"tui_enabled" json:"tui_enabled"`
AutoInstallDeps bool `yaml:"auto_install_deps" json:"auto_install_deps"`
FallbackToPlainCLI bool `yaml:"fallback_to_plain_cli" json:"fallback_to_plain_cli"`
LogLevel string `yaml:"log_level" json:"log_level"`
Theme string `yaml:"theme" json:"theme"`
Language string `yaml:"language" json:"language"`
Agent *AgentConfig `yaml:"agent,omitempty" json:"agent,omitempty"`
Profiles map[string]*AgentConfig `yaml:"profiles,omitempty" json:"profiles,omitempty"`
ActiveProfile string `yaml:"active-profile,omitempty" json:"active_profile,omitempty"`
}
func (*Config) CreateProfile ¶ added in v1.0.34
func (c *Config) CreateProfile(name string, agent *AgentConfig) error
func (*Config) DeleteProfile ¶ added in v1.0.34
func (*Config) GetActiveProfile ¶ added in v1.0.34
func (*Config) GetProfile ¶ added in v1.0.34
func (c *Config) GetProfile(name string) (*AgentConfig, error)
func (*Config) HasProfiles ¶ added in v1.0.34
func (*Config) HasSensitiveValues ¶ added in v1.0.34
func (*Config) ListProfiles ¶ added in v1.0.34
func (*Config) ProfileExists ¶ added in v1.0.34
func (*Config) SetActiveProfile ¶ added in v1.0.34
type ConfigKeyDef ¶ added in v1.0.34
type ConfigKeyDef struct {
Key string `json:"key"`
Type ConfigKeyType `json:"type"`
EnvVar string `json:"env_var"`
CLIFlag string `json:"cli_flag"`
Default interface{} `json:"default"`
Sensitive bool `json:"sensitive"`
Description string `json:"description"`
EnumValues []string `json:"enum_values,omitempty"`
Category string `json:"category"`
}
func LookupKey ¶ added in v1.0.34
func LookupKey(key string) (*ConfigKeyDef, error)
type ConfigKeyType ¶ added in v1.0.34
type ConfigKeyType string
const ( KeyTypeString ConfigKeyType = "string" KeyTypeBool ConfigKeyType = "bool" KeyTypeEnum ConfigKeyType = "enum" KeyTypeStringList ConfigKeyType = "string-list" KeyTypeStringMap ConfigKeyType = "string-map" )
type ConfigScope ¶ added in v1.0.34
type ConfigScope string
const ( ScopeDefault ConfigScope = "default" ScopeGlobal ConfigScope = "global" ScopeProfile ConfigScope = "profile" ScopeTeamLocal ConfigScope = "local" ScopePersonalLocal ConfigScope = "personal" )
type PersonalConfig ¶ added in v1.0.34
type PersonalConfig struct {
Agent *AgentConfig `yaml:"agent,omitempty"`
ActiveProfile string `yaml:"active-profile,omitempty"`
}
func LoadPersonal ¶ added in v1.0.34
func LoadPersonal(projectPath string) (*PersonalConfig, error)
func (*PersonalConfig) HasAgentConfig ¶ added in v1.0.34
func (c *PersonalConfig) HasAgentConfig() bool
func (*PersonalConfig) Save ¶ added in v1.0.34
func (c *PersonalConfig) Save(projectPath string) error
func (*PersonalConfig) SetAgentConfigValue ¶ added in v1.0.34
func (c *PersonalConfig) SetAgentConfigValue(key, value string) error
func (*PersonalConfig) UnsetAgentConfigValue ¶ added in v1.0.34
func (c *PersonalConfig) UnsetAgentConfigValue(key string) error
type ResolvedConfig ¶ added in v1.0.34
type ResolvedConfig struct {
Values map[string]*ResolvedValue `json:"values"`
ActiveProfile string `json:"active_profile"`
}
func MergeConfigs ¶ added in v1.0.34
func MergeConfigs(defaults, global, profile, teamLocal, personalLocal *AgentConfig) *ResolvedConfig
func (*ResolvedConfig) Get ¶ added in v1.0.34
func (r *ResolvedConfig) Get(key string) *ResolvedValue
func (*ResolvedConfig) GetEnvVars ¶ added in v1.0.34
func (r *ResolvedConfig) GetEnvVars() map[string]string
func (*ResolvedConfig) GetValue ¶ added in v1.0.34
func (r *ResolvedConfig) GetValue(key string) interface{}
type ResolvedValue ¶ added in v1.0.34
type ResolvedValue struct {
Key string `json:"key"`
Value interface{} `json:"value"`
Source ConfigScope `json:"source"`
Sensitive bool `json:"sensitive"`
}
type SchemaRegistry ¶ added in v1.0.34
type SchemaRegistry struct {
// contains filtered or unexported fields
}
func GetRegistry ¶ added in v1.0.34
func GetRegistry() *SchemaRegistry
func (*SchemaRegistry) FindSimilar ¶ added in v1.0.34
func (r *SchemaRegistry) FindSimilar(key string) []string
func (*SchemaRegistry) IsValidKey ¶ added in v1.0.34
func (r *SchemaRegistry) IsValidKey(key string) bool
func (*SchemaRegistry) List ¶ added in v1.0.34
func (r *SchemaRegistry) List() []*ConfigKeyDef
func (*SchemaRegistry) ListByCategory ¶ added in v1.0.34
func (r *SchemaRegistry) ListByCategory() map[string][]*ConfigKeyDef
func (*SchemaRegistry) Lookup ¶ added in v1.0.34
func (r *SchemaRegistry) Lookup(key string) (*ConfigKeyDef, error)
Click to show internal directories.
Click to hide internal directories.