pub struct McPaths {Show 14 fields
pub root: PathBuf,
pub cache: PathBuf,
pub state: PathBuf,
pub sessions: PathBuf,
pub checkpoints: PathBuf,
pub skills: PathBuf,
pub prompts: PathBuf,
pub subagents: PathBuf,
pub primary_agents: PathBuf,
pub user_agents: PathBuf,
pub settings_file: PathBuf,
pub project_settings_file: PathBuf,
pub local_settings_file: Option<PathBuf>,
pub auth_file: PathBuf,
}Fields§
§root: PathBuf§cache: PathBuf§state: PathBuf§sessions: PathBuf§checkpoints: PathBuf§skills: PathBuf§prompts: PathBuf§subagents: PathBuf§primary_agents: PathBuf§user_agents: PathBuf§settings_file: PathBuf§project_settings_file: PathBuf§local_settings_file: Option<PathBuf>§auth_file: PathBufImplementations§
Source§impl McPaths
impl McPaths
pub fn resolve() -> Result<Self>
Sourcepub fn from_root_and_project_dir(root: PathBuf, project_dir: PathBuf) -> Self
pub fn from_root_and_project_dir(root: PathBuf, project_dir: PathBuf) -> Self
Constructs paths from an explicit storage root and project directory.
The project settings target is always <project_dir>/.magi-code/settings.json.
local_settings_file is populated only when that target exists when this method runs.
Sourcepub fn from_root(root: PathBuf) -> Self
pub fn from_root(root: PathBuf) -> Self
Compatibility wrapper that uses the current process directory as the project directory.
New internal callers should use Self::from_root_and_project_dir so path resolution is
deterministic. This wrapper retains the historical from_root behavior and does not
detect a local settings file.
pub fn ensure_runtime_dirs(&self) -> Result<()>
Trait Implementations§
impl Eq for McPaths
impl StructuralPartialEq for McPaths
Auto Trait Implementations§
impl Freeze for McPaths
impl RefUnwindSafe for McPaths
impl Send for McPaths
impl Sync for McPaths
impl Unpin for McPaths
impl UnsafeUnpin for McPaths
impl UnwindSafe for McPaths
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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