pub struct CoreConfig {
pub scratchpad: String,
pub specs_dir: String,
pub guardrails: Vec<String>,
pub workspace_root: PathBuf,
}Expand description
Core paths and settings shared across all hats.
Per spec: “Core behaviors (always injected, can customize paths)”
Fields§
§scratchpad: StringPath to the scratchpad file (shared state between hats).
specs_dir: StringPath to the specs directory (source of truth for requirements).
guardrails: Vec<String>Guardrails injected into every prompt (core behaviors).
Per spec: These are always present regardless of hat.
workspace_root: PathBufRoot directory for workspace-relative paths (.ralph/, specs, etc.).
All relative paths (scratchpad, specs_dir, memories) are resolved relative to this directory. Defaults to the current working directory.
This is especially important for E2E tests that run in isolated workspaces.
Implementations§
Source§impl CoreConfig
impl CoreConfig
Sourcepub fn with_workspace_root(self, root: impl Into<PathBuf>) -> Self
pub fn with_workspace_root(self, root: impl Into<PathBuf>) -> Self
Sets the workspace root for resolving relative paths.
This is used by E2E tests to point to their isolated test workspace.
Sourcepub fn resolve_path(&self, relative: &str) -> PathBuf
pub fn resolve_path(&self, relative: &str) -> PathBuf
Resolves a relative path against the workspace root.
If the path is already absolute, it is returned as-is. Otherwise, it is joined with the workspace root.
Trait Implementations§
Source§impl Clone for CoreConfig
impl Clone for CoreConfig
Source§fn clone(&self) -> CoreConfig
fn clone(&self) -> CoreConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CoreConfig
impl Debug for CoreConfig
Source§impl Default for CoreConfig
impl Default for CoreConfig
Source§impl<'de> Deserialize<'de> for CoreConfig
impl<'de> Deserialize<'de> for CoreConfig
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>,
Auto Trait Implementations§
impl Freeze for CoreConfig
impl RefUnwindSafe for CoreConfig
impl Send for CoreConfig
impl Sync for CoreConfig
impl Unpin for CoreConfig
impl UnwindSafe for CoreConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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