Skip to main content

Module config

Module config 

Source
Expand description

Configuration, and the agent presets that make a new CLI a data change rather than a code change.

Presets are compiled into the binary. That is not an optimisation: a cargo installed binary has no source tree beside it, so a preset read from a relative path would work for the author and fail for everyone else. Files on disk still win over the built in copies, so a preset can be overridden or a new one added without rebuilding.

Structs§

AgentSpec
Everything needed to drive one CLI. An agent is data, not a class: supporting a new tool is a preset file.
Config
EffortSchedule
LoopCfg
OptionInfo
One option the parser accepts, with the value it takes when unset.
StyleCfg

Enums§

CommandPart
One element of a command template: a bare argument, or a group that is dropped whole when its placeholder is unset.
Followups
Where an out of scope finding goes. On your own repository an issue is the right home. On a large repository that is not yours it is somebody else’s notification and somebody else’s triage queue.
OutputMode
How to read the answer out of what a CLI printed.
PrComments
How much of its own working spar narrates into a pull request thread.
StateStore
Where resume state lives. Local keeps the PR clean and costs no API calls; writing to the PR only buys anything if a run might be resumed from a different checkout.
SystemVia
Where the style rules go when a CLI has a system prompt flag.

Constants§

BUILTIN_PRESETS
Presets that ship inside the binary.
CONFIG_NAMES

Functions§

available_presets
Every preset name available, built in and on disk, sorted.
find_config
Find a config: an explicit path, then the working directory, then ~/.config/spar/spar.toml.
known_options
Every option a config file may set, with its default.
load
load_preset
Load a preset. A file on disk wins over the built in copy of the same name, so a drifting CLI can be corrected without waiting for a release.
mentions
Whether a config file mentions an option at all, set or commented out.
parse
preset_dirs
Directories searched for preset overrides, nearest first.
resolve_search_path
Resolve a configured search path, expanding a leading ~.
unmentioned_options
Options this config file has never heard of, which is what somebody who upgraded wants to know.