Documentation
¶
Index ¶
- func GenCompletions(command *cobra.Command, shell string) error
- func MaxAPIKeyFileBytesForTest() int64
- func ReadAPIKeyFile(path string) (string, error)
- type AgentConfig
- type Config
- type FileIO
- func (f *FileIO) Delete(pattern string) error
- func (f *FileIO) List() ([]string, error)
- func (f *FileIO) Read() (Config, error)
- func (f *FileIO) ReadDefaults() Config
- func (f *FileIO) WithConfigPath(configFilePath string) *FileIO
- func (f *FileIO) WithHistoryPath(historyPath string) *FileIO
- func (f *FileIO) Write(config Config) error
- type FileNotFoundError
- type Manager
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenCompletions ¶ added in v1.4.2
func MaxAPIKeyFileBytesForTest ¶ added in v1.10.10
func MaxAPIKeyFileBytesForTest() int64
func ReadAPIKeyFile ¶ added in v1.10.10
Types ¶
type AgentConfig ¶ added in v1.10.3
type AgentConfig struct {
Mode string `yaml:"mode"`
WorkDir string `yaml:"work_dir"`
DryRun bool `yaml:"dry_run"`
// Budgets / guardrails (0 = unlimited)
MaxSteps int `yaml:"max_steps"`
MaxIterations int `yaml:"max_iterations"`
MaxWallTime int `yaml:"max_wall_time"`
MaxShellCalls int `yaml:"max_shell_calls"`
MaxLLMCalls int `yaml:"max_llm_calls"`
MaxFileOps int `yaml:"max_file_ops"`
MaxLLMTokens int `yaml:"max_llm_tokens"`
// Safety/policy
AllowedTools []string `yaml:"allowed_tools"`
DeniedShellCommands []string `yaml:"denied_shell_commands"`
AllowedFileOps []string `yaml:"allowed_file_ops"`
RestrictFilesToWorkDir bool `yaml:"restrict_files_to_work_dir"`
// Logging / artifacts
WritePlanJSON bool `yaml:"write_plan_json"`
PlanJSONPath string `yaml:"plan_json_path"`
}
type Config ¶ added in v1.7.6
type Config struct {
Name string `yaml:"name"`
APIKey string `yaml:"api_key"`
APIKeyFile string `yaml:"api_key_file"`
Model string `yaml:"model"`
MaxTokens int `yaml:"max_tokens"`
ContextWindow int `yaml:"context_window"`
Role string `yaml:"role"`
Temperature float64 `yaml:"temperature"`
TopP float64 `yaml:"top_p"`
FrequencyPenalty float64 `yaml:"frequency_penalty"`
PresencePenalty float64 `yaml:"presence_penalty"`
Thread string `yaml:"thread"`
OmitHistory bool `yaml:"omit_history"`
URL string `yaml:"url"`
CompletionsPath string `yaml:"completions_path"`
ModelsPath string `yaml:"models_path"`
ResponsesPath string `yaml:"responses_path"`
SpeechPath string `yaml:"speech_path"`
ImageGenerationsPath string `yaml:"image_generations_path"`
ImageEditsPath string `yaml:"image_edits_path"`
TranscriptionsPath string `yaml:"transcriptions_path"`
AuthHeader string `yaml:"auth_header"`
AuthTokenPrefix string `yaml:"auth_token_prefix"`
CommandPrompt string `yaml:"command_prompt"`
CommandPromptColor string `yaml:"command_prompt_color"`
OutputPrompt string `yaml:"output_prompt"`
OutputPromptColor string `yaml:"output_prompt_color"`
AutoCreateNewThread bool `yaml:"auto_create_new_thread"`
AutoShellTitle bool `yaml:"auto_shell_title"`
TrackTokenUsage bool `yaml:"track_token_usage"`
SkipTLSVerify bool `yaml:"skip_tls_verify"`
HTTPTimeout int `yaml:"http_timeout"`
Multiline bool `yaml:"multiline"`
Web bool `yaml:"web"`
WebContextSize string `yaml:"web_context_size"`
Seed int `yaml:"seed"`
Effort string `yaml:"effort"`
Voice string `yaml:"voice"`
UserAgent string `yaml:"user_agent"`
CustomHeaders map[string]string `yaml:"custom_headers"`
Agent AgentConfig `yaml:"agent"`
}
type FileIO ¶
type FileIO struct {
// contains filtered or unexported fields
}
func (*FileIO) ReadDefaults ¶ added in v1.1.0
func (*FileIO) WithConfigPath ¶ added in v1.4.1
func (*FileIO) WithHistoryPath ¶ added in v1.4.1
type FileNotFoundError ¶ added in v1.7.10
type FileNotFoundError struct {
Path string
}
FileNotFoundError is a custom error type for non-existent files
func (*FileNotFoundError) Error ¶ added in v1.7.10
func (e *FileNotFoundError) Error() string
type Manager ¶ added in v1.7.6
type Manager struct {
Config Config
// contains filtered or unexported fields
}
func NewManager ¶ added in v1.7.6
func (*Manager) APIKeyEnvVarName ¶ added in v1.7.6
func (*Manager) DeleteThread ¶ added in v1.7.6
DeleteThread removes the specified thread from the configuration store. This operation is idempotent; non-existent threads do not cause errors.
func (*Manager) ListThreads ¶ added in v1.7.6
ListThreads retrieves a list of all threads stored in the configuration. It marks the current thread with an asterisk (*) and returns the list sorted alphabetically. If an error occurs while retrieving the threads from the config store, it returns the error.
func (*Manager) ShowConfig ¶ added in v1.7.6
ShowConfig serializes the current configuration to a YAML string. It returns the serialized string or an error if the serialization fails.
func (*Manager) WithEnvironment ¶ added in v1.7.6
Click to show internal directories.
Click to hide internal directories.