Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DefaultProvider string `yaml:"default_provider"`
DefaultModel string `yaml:"default_model"`
Theme string `yaml:"theme"`
InstructionCompat []string `yaml:"instruction_compat"`
Permissions PermissionConfig `yaml:"permissions"`
Daemon DaemonConfig `yaml:"daemon"`
ModelRouting ModelRouting `yaml:"model_routing"`
Context ContextConfig `yaml:"context"`
Trust TrustConfig `yaml:"trust"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type ContextConfig ¶
type ContextConfig struct {
// CompressionThreshold is the fraction of the model's context limit at which
// auto-compression triggers (default 0.9).
CompressionThreshold float64 `yaml:"compression_threshold"`
// PreserveMessages is how many recent messages to keep verbatim after compression
// (default 10).
PreserveMessages int `yaml:"preserve_messages"`
// CompressionModel overrides the model used for summarisation. Empty means
// auto-select the cheapest available model.
CompressionModel string `yaml:"compression_model"`
// ModelLimits maps model names to their context window size in tokens.
// Used by the chat handler to determine when to trigger compression.
// Falls back to 200000 for unknown models.
ModelLimits map[string]int `yaml:"model_limits"`
}
ContextConfig controls automatic context-window compression behaviour.
type DaemonConfig ¶
type ModelRouting ¶
type ModelRouting struct {
// SimpleTaskModel is used for lightweight steps (set, log, validate, etc.).
SimpleTaskModel string `yaml:"simple_task_model"`
// ComplexTaskModel is used for heavy steps (http_call, db_query, code execution, etc.).
ComplexTaskModel string `yaml:"complex_task_model"`
// ReviewModel is used for code review / plan review tasks.
ReviewModel string `yaml:"review_model"`
}
ModelRouting controls which model handles which class of task.
type PermissionConfig ¶
type TrustConfig ¶
type TrustConfig struct {
Mode string `yaml:"mode"`
Rules []TrustRuleConfig `yaml:"rules"`
ProviderArgs map[string][]string `yaml:"provider_args"`
}
TrustConfig is the trust section of ~/.ratchet/config.yaml.
func (*TrustConfig) ProviderArgsFor ¶
func (tc *TrustConfig) ProviderArgsFor(providerName string) []string
ProviderArgsFor returns CLI args for the given provider name.
func (*TrustConfig) ToTrustRules ¶
func (tc *TrustConfig) ToTrustRules() []policy.TrustRule
ToTrustRules converts the config rules into policy.TrustRule values.
type TrustRuleConfig ¶
TrustRuleConfig is a single trust rule in the ratchet config format.
Click to show internal directories.
Click to hide internal directories.