config

package
v0.2.79 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultRuntimeDir = ".rocketclaw"

Variables

This section is empty.

Functions

func SecretEnv added in v0.2.20

func SecretEnv(ctx context.Context, fetcher SecretFetcher, arns []string) (map[string]string, error)

Types

type AWSFetcher added in v0.0.46

type AWSFetcher struct {
	// contains filtered or unexported fields
}

func (*AWSFetcher) SecretString added in v0.0.46

func (f *AWSFetcher) SecretString(ctx context.Context, arn string) (string, error)

type AttachmentDriver added in v0.1.0

type AttachmentDriver string
const (
	FilesystemAttachments AttachmentDriver = "filesystem"
	S3Attachments         AttachmentDriver = "s3"
)

type AttachmentsConfig added in v0.1.0

type AttachmentsConfig struct {
	Driver    AttachmentDriver `json:"driver"`
	Path      string           `json:"path,omitempty"`
	BucketARN string           `json:"bucket_arn,omitempty"`
}

type Behavior added in v0.2.41

type Behavior struct {
	AutoApproverModel string `json:"auto_approver_model"`
	Slack             struct {
		Channels             []SlackChannelConfig `json:"channels"`
		AmbientDecisionModel string               `json:"ambient_decision_model"`
	} `json:"slack"`
	Logging            LoggingConfig        `json:"logging"`
	Overlays           []string             `json:"overlays"`
	EmbeddedAgents     EmbeddedAgentsConfig `json:"embedded_agents"`
	TitleModel         string               `json:"title_model"`
	TitleDecisionModel string               `json:"title_decision_model"`
}

type Config

type Config struct {
	Workspace          string                                      `json:"workspace"`
	DatabaseURL        string                                      `json:"database_url"`
	Attachments        AttachmentsConfig                           `json:"attachments,omitzero"`
	WorkDir            string                                      `json:"-"`
	Revision           string                                      `json:"-"`
	RevisionModified   bool                                        `json:"-"`
	Overlays           []string                                    `json:"overlays,omitempty"`
	Web                WebConfig                                   `json:"web,omitzero"`
	ServerDisplayName  string                                      `json:"server_display_name,omitempty"`
	Logging            LoggingConfig                               `json:"logging"`
	MCPExternal        MCPExternalConfig                           `json:"mcp_external"`
	MCPServers         map[string]MCPServerConfig                  `json:"mcp_servers,omitempty"`
	OpenCode           map[string]OpenCodeConfig                   `json:"opencode,omitempty"`
	RocketClaws        map[string]RemoteRocketClawConfig           `json:"rocketclaws,omitempty"`
	TrustedRocketClaws []string                                    `json:"trusted_rocketclaws,omitempty"`
	Slack              SlackConfig                                 `json:"slack"`
	OpenAI             OpenAIConfig                                `json:"openai"`
	Providers          map[string]OpenAIConfig                     `json:"providers,omitempty"`
	AutoApproverModel  string                                      `json:"auto_approver_model"`
	AgentEditorModel   string                                      `json:"agent_editor_model,omitempty"`
	TitleModel         string                                      `json:"title_model,omitempty"`
	TitleDecisionModel string                                      `json:"title_decision_model,omitempty"`
	Decision           map[DecisionProvider]DecisionProviderConfig `json:"decision,omitempty"`
	PostHog            PostHogConfig                               `json:"posthog,omitzero"`
	Permissions        map[string][]string                         `json:"permissions,omitempty"`
	EmbeddedAgents     EmbeddedAgentsConfig                        `json:"embedded_agents,omitzero"`
}

func Load

func Load(configPath, secretsARN string, fetcher SecretFetcher) (*Config, error)

func (*Config) AttachmentLocation added in v0.1.0

func (c *Config) AttachmentLocation() (AttachmentDriver, string, error)

func (*Config) Behavior added in v0.2.41

func (c *Config) Behavior() Behavior

func (*Config) DecisionProviderNames added in v0.2.31

func (c *Config) DecisionProviderNames() []string

func (*Config) MCPFacets added in v0.2.51

func (c *Config) MCPFacets() map[string]map[string][]string

func (*Config) PermittedSpaces added in v0.2.26

func (c *Config) PermittedSpaces(login string) []string

func (*Config) Provider added in v0.0.42

func (c *Config) Provider(name string) (OpenAIConfig, bool)

func (*Config) ProviderNames added in v0.2.20

func (c *Config) ProviderNames() []string

func (*Config) RuntimeDirName added in v0.0.25

func (c *Config) RuntimeDirName() string

func (*Config) SetBehavior added in v0.2.41

func (c *Config) SetBehavior(b *Behavior)

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) ValidateBehavior added in v0.2.41

func (c *Config) ValidateBehavior() error

func (*Config) ValidateTsnet added in v0.2.57

func (c *Config) ValidateTsnet() error

type DecisionProvider added in v0.2.31

type DecisionProvider string
const (
	DecisionOpenAI   DecisionProvider = "openai"
	DecisionTypeSafe DecisionProvider = "typesafe"
)

type DecisionProviderConfig added in v0.2.31

type DecisionProviderConfig struct {
	APIKey     string `json:"api_key"`
	APIBaseURL string `json:"api_base_url,omitempty"`
}

type EmbeddedAgentConfig added in v0.2.62

type EmbeddedAgentConfig struct {
	Disabled bool   `json:"disabled"`
	Model    string `json:"model"`
}

type EmbeddedAgentsConfig added in v0.2.62

type EmbeddedAgentsConfig struct {
	Main EmbeddedAgentConfig `json:"main"`
}

type LockedConfig added in v0.1.23

type LockedConfig struct {
	// contains filtered or unexported fields
}

func NewLockedConfig added in v0.1.23

func NewLockedConfig(cfg *Config) *LockedConfig

func (*LockedConfig) Clone added in v0.1.23

func (c *LockedConfig) Clone() *Config

func (*LockedConfig) Do added in v0.1.23

func (c *LockedConfig) Do(work func(cfg *Config) error) error

func (*LockedConfig) PermittedSpaces added in v0.2.59

func (c *LockedConfig) PermittedSpaces(login string) []string

func (*LockedConfig) Store added in v0.1.23

func (c *LockedConfig) Store(cfg *Config)

type LoggingConfig

type LoggingConfig struct {
	Level string `json:"level"`
}

type MCPExternalConfig

type MCPExternalConfig struct {
	Enabled    bool              `json:"enabled"`
	ListenAddr string            `json:"listen_addr"`
	Users      map[string]string `json:"users"`
}

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"`
	Tools   map[string][]string `json:"tools,omitempty"`
}

type OpenAIConfig

type OpenAIConfig struct {
	APIKey                             string `json:"api_key"`
	APIBaseURL                         string `json:"api_base_url"`
	Auth                               string `json:"auth"`
	AutocompactionThreshold            int64  `json:"autocompaction_threshold,omitempty"`
	PromptCacheMarkersRelativePosition *int   `json:"prompt_cache_markers_relative_position,omitempty"`
}

func (*OpenAIConfig) AuthMode added in v0.2.57

func (c *OpenAIConfig) AuthMode() string

type OpenCodeConfig added in v0.1.47

type OpenCodeConfig struct {
	URL      string `json:"url"`
	Password string `json:"password"`
}

type PostHogConfig added in v0.2.13

type PostHogConfig struct {
	ProjectToken string `json:"project_token,omitempty"`
	Host         string `json:"host,omitempty"`
}

type RemoteRocketClawConfig added in v0.2.19

type RemoteRocketClawConfig struct {
	URL string `json:"url"`
}

type RoutineDefinition added in v0.2.77

type RoutineDefinition struct {
	Job      protocol.OneOffRoutine
	Schedule RoutineSchedule
}

type RoutineSchedule added in v0.2.77

type RoutineSchedule struct {
	Raw string
	// contains filtered or unexported fields
}

func ParseRoutineSchedule added in v0.2.77

func ParseRoutineSchedule(raw string) (RoutineSchedule, error)

func (RoutineSchedule) Next added in v0.2.77

func (s RoutineSchedule) Next(now time.Time) time.Time

type SecretFetchError added in v0.0.46

type SecretFetchError struct {
	ARN string
	Key string
	// contains filtered or unexported fields
}

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

type SecretFetcher interface {
	SecretString(ctx context.Context, arn string) (string, error)
}

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"`
	WakeWhen       string   `json:"wake_when,omitempty"`
	Engagement     string   `json:"engagement,omitempty"`
}

type SlackConfig

type SlackConfig struct {
	BotToken             string               `json:"bot_token"`
	AppToken             string               `json:"app_token"`
	AmbientDecisionModel string               `json:"ambient_decision_model,omitempty"`
	Channels             []SlackChannelConfig `json:"channels,omitempty"`
}

func (SlackConfig) Channel added in v0.1.0

func (s SlackConfig) Channel(name string) (SlackChannelConfig, bool)

type TsnetConfig added in v0.1.30

type TsnetConfig struct {
	Hostname string   `json:"hostname,omitempty"`
	Tags     []string `json:"tags,omitempty"`
	AuthKey  string   `json:"auth_key,omitempty"`
	Origin   string   `json:"-"`
}

type WebConfig added in v0.1.0

type WebConfig struct {
	Admins []string     `json:"admins,omitempty"`
	Tsnet  *TsnetConfig `json:"tsnet,omitempty"`
}

Jump to

Keyboard shortcuts

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