#[non_exhaustive]pub enum ParentContextPolicy {
Inherit,
InheritSanitized,
None,
}Expand description
Controls how the parent agent’s conversation history is sanitized before passing to a spawned sub-agent.
Prompt injection is a documented attack vector when the parent history contains untrusted
content from web scrapes, tool results, or A2A messages. InheritSanitized is the safe
default: messages pass through ContentSanitizer (in zeph-sanitizer) before injection.
§Examples
[subagent]
parent_context_policy = "inherit_sanitized" # defaultVariants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inherit
Pass the parent history verbatim — legacy behaviour, no sanitization.
InheritSanitized
Sanitize text parts of each message through the IPI pipeline before injection.
None
Do not inject any parent history into the sub-agent context.
Trait Implementations§
Source§impl Clone for ParentContextPolicy
impl Clone for ParentContextPolicy
Source§fn clone(&self) -> ParentContextPolicy
fn clone(&self) -> ParentContextPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParentContextPolicy
Source§impl Debug for ParentContextPolicy
impl Debug for ParentContextPolicy
Source§impl Default for ParentContextPolicy
impl Default for ParentContextPolicy
Source§fn default() -> ParentContextPolicy
fn default() -> ParentContextPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParentContextPolicy
impl<'de> Deserialize<'de> for ParentContextPolicy
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
impl Eq for ParentContextPolicy
Source§impl PartialEq for ParentContextPolicy
impl PartialEq for ParentContextPolicy
Source§fn eq(&self, other: &ParentContextPolicy) -> bool
fn eq(&self, other: &ParentContextPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ParentContextPolicy
impl Serialize for ParentContextPolicy
impl StructuralPartialEq for ParentContextPolicy
Auto Trait Implementations§
impl Freeze for ParentContextPolicy
impl RefUnwindSafe for ParentContextPolicy
impl Send for ParentContextPolicy
impl Sync for ParentContextPolicy
impl Unpin for ParentContextPolicy
impl UnsafeUnpin for ParentContextPolicy
impl UnwindSafe for ParentContextPolicy
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
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<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
Compare self to
key and return true if they are equal.