pub struct ConfigLoader { /* private fields */ }Implementations§
Source§impl ConfigLoader
impl ConfigLoader
pub fn new(config_path: PathBuf) -> Self
pub fn for_active_profile() -> ConfigLoadResult<Self>
Sourcepub fn load() -> ConfigLoadResult<ServicesConfig>
pub fn load() -> ConfigLoadResult<ServicesConfig>
Loads the active profile’s services configuration.
The result is cached for the lifetime of the process, keyed by the resolved configuration path. Boot alone calls this dozens of times — startup validation, the scheduler, the agent registry, and every MCP deployment accessor — and each uncached call re-read the YAML, re-walked the skills/plugins/marketplaces trees, and re-validated the whole file. Configuration is fixed for the life of a deployment, so an edit requires a restart to take effect.
Sourcepub fn reload() -> ConfigLoadResult<ServicesConfig>
pub fn reload() -> ConfigLoadResult<ServicesConfig>
Re-reads and re-validates the active profile’s services configuration,
bypassing the Self::load cache and refreshing it with the result.
Required by any command that validates its own write: the agent
create/edit/delete commands each load the configuration to resolve their
target before writing, so a cached Self::load afterwards would
return the pre-write state and the validation would silently pass.
Sourcepub fn load_cached_from_path(path: &Path) -> ConfigLoadResult<ServicesConfig>
pub fn load_cached_from_path(path: &Path) -> ConfigLoadResult<ServicesConfig>
Self::load against an explicit path, sharing the same process-wide
cache.
Sourcepub fn reload_from_path(path: &Path) -> ConfigLoadResult<ServicesConfig>
pub fn reload_from_path(path: &Path) -> ConfigLoadResult<ServicesConfig>
Self::reload against an explicit path.
pub fn load_from_path(path: &Path) -> ConfigLoadResult<ServicesConfig>
pub fn load_from_content( content: &str, path: &Path, ) -> ConfigLoadResult<ServicesConfig>
pub fn validate_file(path: &Path) -> ConfigLoadResult<()>
pub fn get_includes(&self) -> ConfigLoadResult<Vec<String>>
pub fn list_all_includes(&self) -> ConfigLoadResult<Vec<(String, bool)>>
pub fn base_path(&self) -> &Path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigLoader
impl RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin for ConfigLoader
impl UnsafeUnpin for ConfigLoader
impl UnwindSafe for ConfigLoader
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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