pub enum AgentMode {
Full,
Worker,
Orchestrator,
Planner,
Reviewer,
Auditor,
}Expand description
Agent mode — controls which tools and mana actions the agent may use.
Variants§
Full
Default. Full access to all tools. No filtering.
Worker
Unit executor. Read + write + bash. No mana create/run.
Orchestrator
Plans and executes via mana. Cannot touch files directly.
Planner
Decomposes work. Can read and create mana units. Cannot run them.
Reviewer
Read-only inspector. No mutations, no mana.
Auditor
Batch inspector. Reads code and mana state, produces reports.
Implementations§
Source§impl AgentMode
impl AgentMode
Sourcepub fn allowed_tool_names(&self) -> &'static [&'static str]
pub fn allowed_tool_names(&self) -> &'static [&'static str]
Tool names this mode permits. An empty slice means “allow all” (Full).
Sourcepub fn allows_tool(&self, name: &str) -> bool
pub fn allows_tool(&self, name: &str) -> bool
Returns true if the mode allows the named tool.
Sourcepub fn allowed_mana_actions(&self) -> &'static [&'static str]
pub fn allowed_mana_actions(&self) -> &'static [&'static str]
Mana sub-actions this mode permits. An empty slice means “allow all” (Full).
Sourcepub fn allows_mana_action(&self, action: &str) -> bool
pub fn allows_mana_action(&self, action: &str) -> bool
Returns true if the mode allows the named mana action.
Sourcepub fn from_name(s: &str) -> Option<Self>
pub fn from_name(s: &str) -> Option<Self>
Parse a mode from a string name (e.g. "worker", "full").
Returns None for unrecognised names. Used to read IMP_MODE from the
environment without requiring a full FromStr implementation.
Sourcepub fn instructions(&self) -> Option<&'static str>
pub fn instructions(&self) -> Option<&'static str>
Mode-specific behavioral instruction for the system prompt, if any.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentMode
impl<'de> Deserialize<'de> for AgentMode
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>,
impl Copy for AgentMode
impl Eq for AgentMode
impl StructuralPartialEq for AgentMode
Auto Trait Implementations§
impl Freeze for AgentMode
impl RefUnwindSafe for AgentMode
impl Send for AgentMode
impl Sync for AgentMode
impl Unpin for AgentMode
impl UnsafeUnpin for AgentMode
impl UnwindSafe for AgentMode
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<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
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>
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