pub struct Engine { /* private fields */ }Expand description
The pure-Rust core: takes a command string + optional subdir, returns a
structured result. No MCP types here — the ShellServer adapter wraps
this in MCP responses.
Implementations§
Source§impl Engine
impl Engine
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn root(&self) -> &Path
Sourcepub fn describe(
&self,
subdir: Option<&str>,
) -> Result<DescribeResult, EngineError>
pub fn describe( &self, subdir: Option<&str>, ) -> Result<DescribeResult, EngineError>
Resolve and return the merged config for subdir (or the root).
Sourcepub async fn exec(
&self,
command: &str,
subdir: Option<&str>,
) -> Result<ExecResult, EngineError>
pub async fn exec( &self, command: &str, subdir: Option<&str>, ) -> Result<ExecResult, EngineError>
Run the full pipeline: metacharacter check → tokenize → hard deny → resolve cwd → load config → allowlist → execute.
Auto Trait Implementations§
impl !Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Engine
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