Documentation
¶
Overview ¶
Package settings owns the user's persisted configuration (settings.json): base path, allowed hosts, AI provider URL, masking policy, and compose- discovery config. It lives in its own package so both the server and the standalone `oriel mcp` process can read and atomically write it — the server is the usual writer, but MCP needs to set a stack alias.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAlias ¶
SetAlias sets (or, with an empty alias, clears) the Oriel display alias for a compose project. Display only — the real project name is unchanged.
func Update ¶
Update performs a read-modify-write under a single hold of the lock, so concurrent in-process updates to different fields can't clobber one another. Across processes (server vs. `oriel mcp`) the atomic temp+rename prevents torn files; the last writer wins, acceptable for these low-stakes fields.
Types ¶
type Settings ¶
type Settings struct {
BasePath string `json:"basePath"` // reverse-proxy sub-path, e.g. /oriel ("" = root)
ProviderURL string `json:"providerUrl"` // AI resolver endpoint ("" = dormant)
Discovery discovery.Config `json:"discovery"`
AllowedHosts []string `json:"allowedHosts"` // non-loopback Hosts allowed to reach /api
MaskEnv string `json:"maskEnv"` // inspect env masking: "all" (default) | "sensitive" | "off"
EnvReveal string `json:"envReveal"` // where "reveal values" works: "local" (default) | "remote" | "off"
}
Settings is the single source of truth for everything the user configures (as opposed to colima/docker state). Persisted as settings.json and edited via the UI, the CLI, MCP, or by hand.