pub struct SubAgentPermissions {
pub secrets: Vec<String>,
pub max_turns: u32,
pub background: bool,
pub timeout_secs: u64,
pub ttl_secs: u64,
pub permission_mode: PermissionMode,
pub max_history_messages: usize,
pub worktree: bool,
}Expand description
Runtime permission settings for a sub-agent.
All fields have defaults that apply when the permissions section is absent from
the frontmatter: 20 turns, 600 s timeout, foreground execution, default permission mode.
Fields§
§secrets: Vec<String>Vault secret keys this agent is allowed to request at runtime.
max_turns: u32Maximum number of LLM turns before the agent is force-stopped.
background: boolWhen true, the agent runs independently of the parent cancellation token.
timeout_secs: u64Hard wall-clock timeout in seconds for the entire agent session.
ttl_secs: u64Time-to-live in seconds for permission grants issued to this agent.
permission_mode: PermissionModeControls tool access philosophy (Default, Plan, BypassPermissions).
max_history_messages: usizeMaximum number of messages retained in the in-memory history buffer.
When the live messages vec exceeds this limit the oldest non-system messages
are evicted from the front, keeping the system message intact. Set to 0 to
disable eviction entirely (not recommended for long-running agents).
worktree: boolWhen true, the agent runs inside a dedicated git worktree (INV-1/INV-3).
Requires worktree.enabled = true in the global config and a non-None
bg_isolation setting. When the worktree subsystem is disabled, this field
is silently ignored.
Trait Implementations§
Source§impl Clone for SubAgentPermissions
impl Clone for SubAgentPermissions
Source§fn clone(&self) -> SubAgentPermissions
fn clone(&self) -> SubAgentPermissions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubAgentPermissions
impl Debug for SubAgentPermissions
Source§impl Default for SubAgentPermissions
impl Default for SubAgentPermissions
Source§impl<'de> Deserialize<'de> for SubAgentPermissions
impl<'de> Deserialize<'de> for SubAgentPermissions
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>,
Auto Trait Implementations§
impl Freeze for SubAgentPermissions
impl RefUnwindSafe for SubAgentPermissions
impl Send for SubAgentPermissions
impl Sync for SubAgentPermissions
impl Unpin for SubAgentPermissions
impl UnsafeUnpin for SubAgentPermissions
impl UnwindSafe for SubAgentPermissions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request