Documentation
¶
Overview ¶
Package config loads the daemon's declarative defaults from a user-authored ~/.config/herrscher/config.json. The daemon only ever READS this file (it never rewrites it), so it is safe to comment and hand-edit — unlike state.json, which the daemon rewrites atomically on every /set.
Secrets never live here: gateway tokens/channel ids and any owner token material stay in the 0600 env file. config.json carries only non-secret knobs and declarative runtime defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
DefaultPath returns where the daemon looks for config.json. It sits beside state.json: under $HERRSCHER_STATE_DIR if set, else ~/.config/herrscher.
Types ¶
type Config ¶
type Config struct {
// Daemon knobs (precedence: explicit flag > env > this > built-in default).
Cmd string `json:"cmd"` // base bridged command for new sessions
HealthAddr string `json:"healthAddr"` // serve --health-addr ("" disables)
StatusChannel string `json:"statusChannel"` // self-updating status embed channel
Instance string `json:"instance"` // per-daemon instance slug
Owner string `json:"owner"` // owner id; per-daemon instance-id fallback
// Stale threshold for `session clean`: sessions inactive longer than this
// many days are reported as stale. 0 disables stale detection. Unset (zero)
// means the built-in default (14) is applied by the caller.
SessionMaxIdleDays int `json:"sessionMaxIdleDays,omitempty"`
// Declarative runtime defaults (precedence: live state.json > this > empty).
Home *HomeRef `json:"home"` // session home category/forum
Workspace string `json:"workspace"` // workspace root holding projects
Source string `json:"source"` // herrscher source checkout for /service update
Skills *SkillsConfig `json:"skills,omitempty"`
}
Config is the parsed config.json. Every field is optional; an absent field falls through to the next source in the precedence chain (env / built-in default for knobs, live state.json for the declarative runtime fields).
type HomeRef ¶
HomeRef mirrors state.HomeRef so config.json can declare the session home without this low-level package importing state.
type SkillsConfig ¶
type SkillsConfig struct {
Enabled *bool `json:"enabled,omitempty"`
Roots []string `json:"roots,omitempty"`
}
SkillsConfig configures cross-backend skill injection. A nil pointer, or a nil Enabled, means the feature is on. Roots are extra skill roots appended after the built-in workspace and global (~/.claude/skills) defaults.