Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterServeFlags ¶
RegisterServeFlags registers serve-command flags on fs. The caller must call fs.Parse before passing fs to Load.
func ResolveDataDir ¶
ResolveDataDir returns the effective data directory by applying defaults and environment overrides, without reading any files. Use this to determine where migration should target before calling Load or LoadMinimal.
Types ¶
type Config ¶
type Config struct {
Host string `json:"host"`
Port int `json:"port"`
NoBrowser bool `json:"no_browser"`
DataDir string `json:"data_dir"`
DBPath string `json:"-"`
CursorSecret string `json:"cursor_secret"`
GithubToken string `json:"github_token,omitempty"`
WriteTimeout time.Duration `json:"-"`
// AgentDirs maps each AgentType to its configured
// directories. Single-dir agents store a one-element
// slice; unconfigured agents use nil.
AgentDirs map[parser.AgentType][]string `json:"-"`
ResultContentBlockedCategories []string `json:"result_content_blocked_categories,omitempty"`
// contains filtered or unexported fields
}
Config holds all application configuration.
func Load ¶
Load builds a Config by layering: defaults < config file < env < flags. The provided FlagSet must already be parsed by the caller. Only flags that were explicitly set override the lower layers.
func LoadMinimal ¶
LoadMinimal builds a Config from defaults, env, and config file, without parsing CLI flags. Use this for subcommands that manage their own flag sets.
func (*Config) IsUserConfigured ¶ added in v0.10.0
IsUserConfigured reports whether the agent's directories were explicitly set by the user (via env var or config file) rather than populated from defaults.
func (*Config) ResolveDirs ¶ added in v0.10.0
ResolveDirs returns the effective directories for an agent.
func (*Config) SaveGithubToken ¶
SaveGithubToken persists the GitHub token to the config file.