pub enum BackgroundPromptsPolicy {
AutoPolicy,
Parent,
}Expand description
capabilities.subagents.background_prompts (§2.2 C6’s schema value,
§3.1): how a BACKGROUND child’s tool-approval Ask decisions are
resolved, since a detached background task cannot block on an
interactive prompt it has no way to answer.
Variants§
AutoPolicy
Deny/allow-list only, no interactive handler ever installed on the
child — see Agent::run_spawn_subagent’s C6 wiring: with no
crate::permissions::PermissionsApprovalHandler installed, every
Ask-tier decision fail-closed-denies
(crate::permissions::approval::resolve_ask’s pre-existing “no
handler ⇒ deny” contract) — exactly “deny/allow-list, no
interactive asks”: whatever the rule engine already resolves to
Allow proceeds; anything routed to Ask is refused, never asked.
Parent
Approval requests are pushed onto the PARENT’s queue
(Agent::pending_child_approvals) instead of blocking — the
request is recorded for later parent inspection, but still resolves
to Deny immediately (never hangs waiting for an answer that can’t
arrive synchronously).
Implementations§
Source§impl BackgroundPromptsPolicy
impl BackgroundPromptsPolicy
Sourcepub fn parse(s: &str) -> Option<BackgroundPromptsPolicy>
pub fn parse(s: &str) -> Option<BackgroundPromptsPolicy>
Parse the §3.1 schema string ("auto_policy" | "parent").
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The exact schema string this variant parses from — round-trip
inverse of Self::parse.
Trait Implementations§
Source§impl Clone for BackgroundPromptsPolicy
impl Clone for BackgroundPromptsPolicy
Source§fn clone(&self) -> BackgroundPromptsPolicy
fn clone(&self) -> BackgroundPromptsPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BackgroundPromptsPolicy
Source§impl Debug for BackgroundPromptsPolicy
impl Debug for BackgroundPromptsPolicy
impl Eq for BackgroundPromptsPolicy
Source§impl PartialEq for BackgroundPromptsPolicy
impl PartialEq for BackgroundPromptsPolicy
impl StructuralPartialEq for BackgroundPromptsPolicy
Auto Trait Implementations§
impl Freeze for BackgroundPromptsPolicy
impl RefUnwindSafe for BackgroundPromptsPolicy
impl Send for BackgroundPromptsPolicy
impl Sync for BackgroundPromptsPolicy
impl Unpin for BackgroundPromptsPolicy
impl UnsafeUnpin for BackgroundPromptsPolicy
impl UnwindSafe for BackgroundPromptsPolicy
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.