pub struct SubagentSpec {Show 24 fields
pub name: String,
pub description: String,
pub prompt: String,
pub tools: Option<Vec<String>>,
pub disallowed_tools: Vec<String>,
pub model: Option<String>,
pub color: Option<String>,
pub reasoning_effort: Option<ReasoningEffortLevel>,
pub permissions: AgentPermissionsConfig,
pub skills: Vec<String>,
pub mcp_servers: Vec<SubagentMcpServer>,
pub hooks: Option<HooksConfig>,
pub background: bool,
pub mode: AgentMode,
pub max_turns: Option<usize>,
pub nickname_candidates: Vec<String>,
pub initial_prompt: Option<String>,
pub memory: Option<SubagentMemoryScope>,
pub isolation: Option<IsolationMode>,
pub aliases: Vec<String>,
pub source: SubagentSource,
pub file_path: Option<PathBuf>,
pub warnings: Vec<String>,
pub tool_policy_overrides: BTreeMap<String, ToolPolicy>,
}Fields§
§name: String§description: String§prompt: String§tools: Option<Vec<String>>§disallowed_tools: Vec<String>§model: Option<String>§color: Option<String>§reasoning_effort: Option<ReasoningEffortLevel>§permissions: AgentPermissionsConfig§skills: Vec<String>§mcp_servers: Vec<SubagentMcpServer>§hooks: Option<HooksConfig>§background: bool§mode: AgentMode§max_turns: Option<usize>§nickname_candidates: Vec<String>§initial_prompt: Option<String>§memory: Option<SubagentMemoryScope>§isolation: Option<IsolationMode>§aliases: Vec<String>§source: SubagentSource§file_path: Option<PathBuf>§warnings: Vec<String>§tool_policy_overrides: BTreeMap<String, ToolPolicy>Per-tool policy overrides applied when this agent becomes active.
Keys are tool names, values are the policy to enforce.
Applied on top of (and overriding) the global [tools.policies] from vtcode.toml,
as a session-scoped in-memory overlay: overrides never persist to disk,
are replaced on every agent (re)selection (including session setup), and
can never lift an explicit persisted Deny.
Implementations§
Source§impl SubagentSpec
impl SubagentSpec
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Human-facing built-in name. Canonical IDs and custom agent names stay unchanged.
pub const fn is_primary(&self) -> bool
pub const fn is_subagent(&self) -> bool
pub fn is_read_only(&self) -> bool
pub fn matches_name(&self, candidate: &str) -> bool
Trait Implementations§
Source§impl Clone for SubagentSpec
impl Clone for SubagentSpec
Source§impl Debug for SubagentSpec
impl Debug for SubagentSpec
Source§impl Default for SubagentSpec
impl Default for SubagentSpec
Source§impl<'de> Deserialize<'de> for SubagentSpec
impl<'de> Deserialize<'de> for SubagentSpec
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
Source§impl JsonSchema for SubagentSpec
impl JsonSchema for SubagentSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Forget for SubagentSpec
impl Freeze for SubagentSpecwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<SubagentMcpServer>: Freeze,
PhantomData<HookGroupConfig>: Freeze,
*const LeafNode<String, ToolPolicy> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, ToolPolicy)>>: Freeze,
impl Move for SubagentSpec
impl RefUnwindSafe for SubagentSpec
impl Send for SubagentSpec
impl Sync for SubagentSpec
impl Unpin for SubagentSpec
impl UnsafeUnpin for SubagentSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<SubagentMcpServer>: UnsafeUnpin,
PhantomData<HookGroupConfig>: UnsafeUnpin,
*const LeafNode<String, ToolPolicy> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, ToolPolicy)>>: UnsafeUnpin,
impl UnwindSafe for SubagentSpecwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, ToolPolicy>: UnwindSafe,
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