Versions in this module Expand all Collapse all v1 v1.0.0 Oct 7, 2026 Changes in this version + const ConfigDir + func ApprovalsPath(cwd string) string + func AuditLogPath() string + func EditProjectSettings(root string, edit func(*Settings)) error + func EditUserSettings(edit func(*Settings)) error + func EnsureMemoryDir(cwd string) + func FormatModelID(provider, model string) string + func LockFile(path string) (unlock func(), err error) + func MemoryDir(cwd string) string + func MemoryFilePath(cwd string) string + func ModelSpec(providers map[string]ProviderConfig, name, model string) (provider.ModelSpec, error) + func NeedsSetup() bool + func PatchUserSettings(patch Settings) error + func ProjectRoot(cwd string) string + func ProjectSettingsPath(root string) string + func SessionsDir(cwd string) string + func SnapshotDir(cwd string) string + func UndoStatePath(cwd, sessionID string) string + func UserConfigDir() string + func UserSettingsPath() string + func WriteFileAtomic(path string, data []byte, perm os.FileMode) error + type HookEntry struct + Blocking *bool + Command string + CommandWindows string + Env map[string]string + Headers map[string]string + If string + Matcher string + Prompt string + Timeout *int + Type string + URL string + type HooksConfig map[string][]HookEntry + type Layers struct + Project Settings + Root string + User Settings + func Load(cwd string) (Layers, error) + func (l Layers) Resolve(cwd string, granted Settings) (Resolved, error) + type MCPOAuth struct + ClientID string + ClientSecret string + type MCPServer struct + Args []string + Command string + Cwd string + Env map[string]string + Headers map[string]string + OAuth *MCPOAuth + Type string + URL string + func (s MCPServer) Check() error + type PermissionsConfig struct + Allow []string + Deny []string + ReadRoots []string + WriteRoots []string + type ProviderConfig struct + API string + APIKey string + BaseURL string + Extra *ProviderExtra + Models []string + SmallModel string + Type string + func (pc ProviderConfig) HasCredentials() bool + type ProviderExtra struct + AccessKeyID string + AnthropicBeta string + Headers map[string]string + Region string + SecretAccessKey string + SessionToken string + UserAgent string + type Resolved struct + CompactRatio float64 + CompactWindow int + MaxTurns int + Model string + Permissions PermissionsConfig + Provider string + Providers map[string]ProviderConfig + ReasoningEffort string + SearchAPIKey string + SearchProvider string + Snapshot bool + Telemetry TelemetryConfig + type Settings struct + CompactRatio *float64 + CompactWindow *int + Hooks HooksConfig + MCPServers map[string]MCPServer + MaxTurns *int + Model *string + Permissions *PermissionsConfig + Plugins []string + Provider *string + Providers map[string]*ProviderConfig + ReasoningEffort *string + SearchAPIKey *string + SearchProvider *string + Snapshot *bool + Telemetry *TelemetryConfig + func ForProject(s Settings) (open, grants Settings, refused []string) + type SetupChoice struct + APIKey string + BaseURL string + Model string + Provider string + Type string + type SetupOutcome struct + Model string + Path string + Provider string + func ApplySetup(c SetupChoice) (SetupOutcome, error) + type TelemetryConfig struct + Enabled bool + Endpoint string + PublicKey string + SecretKey string