pub struct GroveConfig {
pub version: u32,
pub mode: Mode,
pub explore: Option<Value>,
pub harnesses: Vec<HarnessId>,
}Expand description
The grove project configuration, persisted to .grove/config.json.
Construct with GroveConfig::default (mode = mcp, no explore section),
then persist with GroveConfig::save.
Fields§
§version: u32Wire version. The only valid value today is 1; [validate] rejects
other values to ensure future migrations are explicit.
mode: ModeWhich grove integration surface is active.
explore: Option<Value>Optional mcp-llm explorer configuration, stored as a raw JSON value
(opaque to core). The CLI layer (which depends on grove-explore-core)
deserializes this into ExploreConfig when it needs typed access.
Omitted from the serialized form when None (see skip_serializing_if).
harnesses: Vec<HarnessId>The coding agents grove init has wired into this project. Defaults to
[claude-code] when absent, so pre-multi-harness configs are unchanged.
Implementations§
Source§impl GroveConfig
impl GroveConfig
Sourcepub fn config_path(root: &Path) -> PathBuf
pub fn config_path(root: &Path) -> PathBuf
The canonical config path for a project rooted at root:
<root>/.grove/config.json.
Sourcepub fn load(root: &Path) -> Result<Self>
pub fn load(root: &Path) -> Result<Self>
Read, deserialize, and validate the config under root.
Three-branch cascade:
config.jsonpresent → read, deserialize, validate (normal path).explore.jsonpresent → one-time legacy migration: synthesise aGroveConfigfrom the old wire shape, writeconfig.jsonatomically, emit a deprecation warning, and return the config.- Neither → actionable
grove initerror (unchanged).
Trait Implementations§
Source§impl Clone for GroveConfig
impl Clone for GroveConfig
Source§fn clone(&self) -> GroveConfig
fn clone(&self) -> GroveConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroveConfig
impl Debug for GroveConfig
Source§impl Default for GroveConfig
impl Default for GroveConfig
Source§impl<'de> Deserialize<'de> for GroveConfig
impl<'de> Deserialize<'de> for GroveConfig
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for GroveConfig
impl PartialEq for GroveConfig
Source§impl Serialize for GroveConfig
impl Serialize for GroveConfig
impl StructuralPartialEq for GroveConfig
Auto Trait Implementations§
impl Freeze for GroveConfig
impl RefUnwindSafe for GroveConfig
impl Send for GroveConfig
impl Sync for GroveConfig
impl Unpin for GroveConfig
impl UnsafeUnpin for GroveConfig
impl UnwindSafe for GroveConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more