config

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package config loads and validates rocketclaw configuration files.

Index

Constants

View Source
const DefaultWebUIListenAddr = "0.0.0.0:8766"

DefaultWebUIListenAddr is the baseline browser voice-mode listener.

View Source
const DefaultWorkDir = ".rocketclaw"

DefaultWorkDir is the generated runtime directory for rocketclaw configs.

Variables

This section is empty.

Functions

func LoadExternalMCPUsers

func LoadExternalMCPUsers(configPath string) (map[string]string, error)

LoadExternalMCPUsers reads the optional rocketclaw.users.json file next to configPath.

Types

type Config

type Config struct {
	Workspace                                string                `json:"workspace"`
	WorkDir                                  string                `json:"-"`
	Overlays                                 []string              `json:"overlays,omitempty"`
	Environment                              []string              `json:"environment,omitempty"`
	EmergencySafeWords                       []string              `json:"emergency_safe_words,omitempty"`
	ThreadAgents                             ThreadAgents          `json:"thread_agents,omitempty"`
	MinimumWaitAfterHumanInteraction         string                `json:"minimum_wait_after_human_interaction"`
	MinimumWaitAfterHumanInteractionDuration time.Duration         `json:"-"`
	Logging                                  LoggingConfig         `json:"logging"`
	DiscordVoice                             DiscordVoiceConfig    `json:"discord_voice"`
	DiscordText                              DiscordTextConfig     `json:"discord_text"`
	MCPExternal                              MCPExternalConfig     `json:"mcp_external"`
	WebUI                                    WebUIConfig           `json:"web_ui"`
	Slack                                    SlackConfig           `json:"slack"`
	OpenAI                                   OpenAIConfig          `json:"openai"`
	Instrumentation                          InstrumentationConfig `json:"instrumentation"`
}

Config is the top-level rocketclaw runtime configuration.

func Load

func Load(configPath string) (*Config, error)

Load reads, normalizes, and validates the rocketclaw configuration file.

func (*Config) Validate

func (c *Config) Validate() error

Validate verifies the configuration is usable for the enabled connectors.

func (*Config) WorkDirName

func (c *Config) WorkDirName() string

WorkDirName returns the selected generated runtime directory name.

type DiscordTextConfig

type DiscordTextConfig struct {
	Enabled     bool             `json:"enabled"`
	Token       string           `json:"token"`
	ChannelID   string           `json:"channel_id"`
	HumanUserID string           `json:"human_user_id"`
	SocialMode  TextSocialConfig `json:"social_mode"`
}

DiscordTextConfig configures the Discord text connector.

type DiscordVoiceConfig

type DiscordVoiceConfig struct {
	Enabled        bool   `json:"enabled"`
	Token          string `json:"token"`
	VoiceChannelID string `json:"voice_channel_id"`
	HumanUserID    string `json:"human_user_id"`
}

DiscordVoiceConfig configures the Discord voice connector.

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 MCPExternalConfig

type MCPExternalConfig struct {
	Enabled       bool     `json:"enabled"`
	ListenAddr    string   `json:"listen_addr"`
	AllowedAgents []string `json:"allowed_agents,omitempty"`
}

MCPExternalConfig configures the persistent external MCP HTTP server.

type OpenAIConfig

type OpenAIConfig struct {
	APIKey         string `json:"api_key"`
	APIBaseURL     string `json:"api_base_url"`
	RocketCodeAuth string `json:"rocketcode_auth"`

	STTModel      string `json:"stt_model"`
	STTPrompt     string `json:"stt_prompt"`
	STTAPIKey     string `json:"stt_key"`
	STTAPIBaseURL string `json:"stt_base_url"`

	TTSModel        string `json:"tts_model"`
	TTSVoice        string `json:"tts_voice"`
	TTSInstructions string `json:"tts_instructions"`
	TTSAPIKey       string `json:"tts_key"`
	TTSAPIBaseURL   string `json:"tts_base_url"`
}

OpenAIConfig configures the OpenAI audio clients.

type SlackConfig

type SlackConfig struct {
	Enabled     bool             `json:"enabled"`
	BotToken    string           `json:"bot_token"`
	AppToken    string           `json:"app_token"`
	Room        string           `json:"room"`
	HumanUserID string           `json:"human_user_id"`
	SocialMode  TextSocialConfig `json:"social_mode"`
}

SlackConfig configures the Slack DM connector.

type TextSocialChannelConfig added in v0.0.7

type TextSocialChannelConfig struct {
	Channel        string   `json:"channel"`
	Agents         []string `json:"agents,omitempty"`
	AllowedUserIDs []string `json:"allowed_user_ids,omitempty"`
}

TextSocialChannelConfig configures one primary text social-mode channel.

type TextSocialConfig added in v0.0.7

type TextSocialConfig struct {
	Enabled         bool                      `json:"enabled"`
	Channels        []TextSocialChannelConfig `json:"channels,omitempty"`
	ContextMessages int                       `json:"context_messages"`
}

TextSocialConfig configures mention-triggered primary text channel conversations.

type ThreadAgent

type ThreadAgent struct {
	Agent   string `json:"agent"`
	PreSeed bool   `json:"pre_seed"`
}

ThreadAgent configures one Slack emoji prefix thread target.

type ThreadAgents

type ThreadAgents map[string]ThreadAgent

ThreadAgents maps Slack emoji prefixes to thread routing config.

type WebUIConfig

type WebUIConfig struct {
	Enabled    bool   `json:"enabled"`
	ListenAddr string `json:"listen_addr"`
	CertFile   string `json:"cert_file"`
	KeyFile    string `json:"key_file"`
}

WebUIConfig configures the browser voice-mode listener.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL