config

package
v0.2.56 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 21 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 LoadOneOffCronjob added in v0.1.17

func LoadOneOffCronjob(workspace, runtimeDir, target string) (protocol.OneOffCronjob, error)

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 AutoApproverDecisionConfig added in v0.2.31

type AutoApproverDecisionConfig struct {
	Model         string  `json:"model,omitempty"`
	MinConfidence float64 `json:"min_confidence,omitempty"`
}

type Behavior added in v0.2.41

type Behavior struct {
	AutoApproverModel string `json:"auto_approver_model"`
	Slack             struct {
		Channels []SlackChannelConfig `json:"channels"`
	} `json:"slack"`
	Logging  LoggingConfig `json:"logging"`
	Overlays []string      `json:"overlays"`
}

type Config

type Config struct {
	Workspace            string                                      `json:"workspace"`
	DatabaseURL          string                                      `json:"database_url"`
	Attachments          AttachmentsConfig                           `json:"attachments,omitzero"`
	WorkDir              string                                      `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"`
	Decision             map[DecisionProvider]DecisionProviderConfig `json:"decision,omitempty"`
	AutoApproverDecision AutoApproverDecisionConfig                  `json:"auto_approver_decision,omitzero"`
	PostHog              PostHogConfig                               `json:"posthog,omitzero"`
	Permissions          map[string][]string                         `json:"permissions,omitempty"`
}

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

type CronSchedule added in v0.1.17

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

func ParseCronDefinition added in v0.1.17

func ParseCronDefinition(data []byte, relativePath string) (protocol.OneOffCronjob, []CronSchedule, error)

func ParseCronSchedule added in v0.2.20

func ParseCronSchedule(raw string) (CronSchedule, error)

func (CronSchedule) Next added in v0.1.17

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

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 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) 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"`
	LegacyAuth                         string `json:"rocketcode_auth,omitempty"`
	AutocompactionThreshold            int64  `json:"autocompaction_threshold,omitempty"`
	PromptCacheMarkersRelativePosition *int   `json:"prompt_cache_markers_relative_position,omitempty"`
}

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 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"`
}

type SlackConfig

type SlackConfig struct {
	BotToken string               `json:"bot_token"`
	AppToken string               `json:"app_token"`
	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