pub struct SubagentConfig {
pub name: String,
pub description: String,
pub tools: Option<Vec<String>>,
pub model: SubagentModel,
pub permission_mode: SubagentPermissionMode,
pub skills: Vec<String>,
pub system_prompt: String,
pub source: SubagentSource,
pub file_path: Option<PathBuf>,
}Expand description
Complete subagent configuration
Fields§
§name: StringUnique identifier
description: StringHuman-readable description for delegation
tools: Option<Vec<String>>Allowed tools (None = inherit all from parent)
model: SubagentModelModel selection
permission_mode: SubagentPermissionModePermission mode
skills: Vec<String>Skills to auto-load
system_prompt: StringSystem prompt (markdown body)
source: SubagentSourceSource location
file_path: Option<PathBuf>File path (if loaded from file)
Implementations§
Source§impl SubagentConfig
impl SubagentConfig
Sourcepub fn from_markdown(
content: &str,
source: SubagentSource,
file_path: Option<PathBuf>,
) -> Result<Self, SubagentParseError>
pub fn from_markdown( content: &str, source: SubagentSource, file_path: Option<PathBuf>, ) -> Result<Self, SubagentParseError>
Parse a subagent from markdown content with YAML frontmatter
Sourcepub fn from_json(name: &str, value: &Value) -> Result<Self, SubagentParseError>
pub fn from_json(name: &str, value: &Value) -> Result<Self, SubagentParseError>
Parse subagent from JSON (for CLI –agents flag)
Sourcepub fn has_tool_access(&self, tool_name: &str) -> bool
pub fn has_tool_access(&self, tool_name: &str) -> bool
Check if this subagent has access to a specific tool
Sourcepub fn allowed_tools(&self) -> Option<&[String]>
pub fn allowed_tools(&self) -> Option<&[String]>
Get the list of allowed tools, or None if all tools are allowed
Sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Check if this is a read-only subagent (like Explore)
Trait Implementations§
Source§impl Clone for SubagentConfig
impl Clone for SubagentConfig
Source§fn clone(&self) -> SubagentConfig
fn clone(&self) -> SubagentConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubagentConfig
impl Debug for SubagentConfig
Source§impl<'de> Deserialize<'de> for SubagentConfig
impl<'de> Deserialize<'de> for SubagentConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SubagentConfig
impl RefUnwindSafe for SubagentConfig
impl Send for SubagentConfig
impl Sync for SubagentConfig
impl Unpin for SubagentConfig
impl UnwindSafe for SubagentConfig
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