Documentation
¶
Overview ¶
Package config loads and validates rocketclaw configuration files.
Index ¶
- Constants
- func LoadDevelopmentMCPUsers(configPath string) (map[string]string, error)
- func LoadExternalMCPUsers(configPath string) (map[string]string, error)
- type AWSFetcher
- type Config
- type InstrumentationConfig
- type LoggingConfig
- type MCPDevelopmentConfig
- type MCPExternalConfig
- type MCPServerConfig
- type OpenAIConfig
- type SecretFetchError
- type SecretFetcher
- type SlackChannelConfig
- type SlackConfig
Constants ¶
const DefaultRuntimeDir = ".rocketclaw"
DefaultRuntimeDir is the generated runtime directory for rocketclaw configs.
Variables ¶
This section is empty.
Functions ¶
func LoadDevelopmentMCPUsers ¶ added in v0.0.50
LoadDevelopmentMCPUsers reads the optional rocketclaw.development.users.json file next to configPath.
Types ¶
type AWSFetcher ¶ added in v0.0.46
type AWSFetcher struct{}
AWSFetcher loads SecretString with the default AWS credential chain.
func (AWSFetcher) SecretString ¶ added in v0.0.46
func (AWSFetcher) SecretString(arn string) (string, error)
SecretString fetches the current SecretString for arn.
type Config ¶
type Config struct {
Workspace string `json:"workspace"`
DatabaseURL string `json:"database_url"`
WorkDir string `json:"-"`
Overlays []string `json:"overlays,omitempty"`
Models map[string]string `json:"models,omitempty"`
Environment []string `json:"environment,omitempty"`
Logging LoggingConfig `json:"logging"`
MCPExternal MCPExternalConfig `json:"mcp_external"`
MCPDevelopment MCPDevelopmentConfig `json:"mcp_development"`
MCPServers map[string]MCPServerConfig `json:"mcp_servers,omitempty"`
Slack SlackConfig `json:"slack"`
OpenAI OpenAIConfig `json:"openai"`
Providers map[string]OpenAIConfig `json:"providers,omitempty"`
AutoApproverModel string `json:"auto_approver_model"`
Instrumentation InstrumentationConfig `json:"instrumentation"`
}
Config is the top-level rocketclaw runtime configuration.
func Load ¶
func Load(configPath, secretsARN string, fetcher SecretFetcher) (*Config, error)
Load reads, normalizes, and validates the rocketclaw configuration file.
func (*Config) Provider ¶ added in v0.0.42
func (c *Config) Provider(name string) (OpenAIConfig, bool)
Provider returns the default or named provider configuration.
func (*Config) RenderAgentModel ¶ added in v0.0.32
RenderAgentModel renders an agent model with the mappings from the loaded config.
func (*Config) RuntimeDirName ¶ added in v0.0.25
RuntimeDirName returns the selected generated runtime directory name.
type InstrumentationConfig ¶ added in v0.0.12
type InstrumentationConfig struct {
Enabled bool `json:"enabled"`
CollectorEndpoint string `json:"collector_endpoint"`
ProjectName string `json:"project_name"`
APIKey string `json:"api_key"`
HideInputs bool `json:"hide_inputs"`
HideOutputs bool `json:"hide_outputs"`
}
InstrumentationConfig configures OpenTelemetry/OpenInference tracing.
type LoggingConfig ¶
type LoggingConfig struct {
Level string `json:"level"`
}
LoggingConfig controls rocketclaw logging.
type MCPDevelopmentConfig ¶ added in v0.0.50
type MCPDevelopmentConfig struct {
Enabled bool `json:"enabled"`
ListenAddr string `json:"listen_addr"`
}
MCPDevelopmentConfig configures the Development MCP HTTP server.
type MCPExternalConfig ¶
type MCPExternalConfig struct {
Enabled bool `json:"enabled"`
ListenAddr string `json:"listen_addr"`
}
MCPExternalConfig configures the persistent external MCP HTTP server.
type MCPServerConfig ¶ added in v0.0.45
type MCPServerConfig struct {
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
Cwd string `json:"cwd,omitempty"`
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
}
MCPServerConfig configures one outbound MCP server for code mode.
type OpenAIConfig ¶
type OpenAIConfig struct {
APIKey string `json:"api_key"`
APIBaseURL string `json:"api_base_url"`
RocketCodeAuth string `json:"rocketcode_auth"`
AutocompactionThreshold int64 `json:"autocompaction_threshold,omitempty"`
}
OpenAIConfig configures the OpenAI client used by RocketCode.
type SecretFetchError ¶ added in v0.0.46
SecretFetchError names the ARN and key of a failed fetch. It never includes the secret body.
func (*SecretFetchError) Error ¶ added in v0.0.46
func (e *SecretFetchError) Error() string
func (*SecretFetchError) Unwrap ¶ added in v0.0.46
func (e *SecretFetchError) Unwrap() error
type SecretFetcher ¶ added in v0.0.46
SecretFetcher returns a Secrets Manager SecretString.
type SlackChannelConfig ¶ added in v0.0.33
type SlackChannelConfig struct {
Channel string `json:"channel"`
Agents []string `json:"agents,omitempty"`
AllowedUserIDs []string `json:"allowed_user_ids,omitempty"`
}
SlackChannelConfig configures one Slack channel.
type SlackConfig ¶
type SlackConfig struct {
BotToken string `json:"bot_token"`
AppToken string `json:"app_token"`
Channels []SlackChannelConfig `json:"channels,omitempty"`
}
SlackConfig configures Slack channel conversations.