pub enum ToolProvenance {
Trusted,
WorkspaceLocal,
PrivateData,
ExternalMcp,
UntrustedNetwork,
}Expand description
Trust and data-provenance tier for a tool.
Ordered monotonically by untrustedness (Trusted < WorkspaceLocal < PrivateData < ExternalMcp < UntrustedNetwork)
so agent runtimes can compute turn taint monotonically via max().
Variants§
Trusted
Deterministic internal or trusted host computation.
WorkspaceLocal
Local workspace files or developer tree state.
PrivateData
Authenticated private user/corp data (mail, drive, calendar, secrets).
ExternalMcp
External MCP server or third-party plugin tool.
UntrustedNetwork
Open internet or arbitrary untrusted network content (web fetch, search, browser).
Implementations§
Source§impl ToolProvenance
impl ToolProvenance
Sourcepub const fn is_trusted(&self) -> bool
pub const fn is_trusted(&self) -> bool
Returns true if the provenance is ToolProvenance::Trusted (the default).
Sourcepub const fn is_untrusted_source(self) -> bool
pub const fn is_untrusted_source(self) -> bool
Returns true if the tool ingests untrusted external content (ExternalMcp or UntrustedNetwork).
Sourcepub const fn is_private_data(self) -> bool
pub const fn is_private_data(self) -> bool
Returns true if the tool accesses authenticated private data (PrivateData).
Sourcepub const fn default_output_sanitization(self) -> OutputSanitization
pub const fn default_output_sanitization(self) -> OutputSanitization
Recommended default OutputSanitization for this provenance tier.
Trait Implementations§
Source§impl Clone for ToolProvenance
impl Clone for ToolProvenance
impl Copy for ToolProvenance
Source§impl Debug for ToolProvenance
impl Debug for ToolProvenance
Source§impl Default for ToolProvenance
impl Default for ToolProvenance
Source§impl<'de> Deserialize<'de> for ToolProvenance
impl<'de> Deserialize<'de> for ToolProvenance
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>,
impl Eq for ToolProvenance
Source§impl Hash for ToolProvenance
impl Hash for ToolProvenance
Source§impl JsonSchema for ToolProvenance
impl JsonSchema for ToolProvenance
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for ToolProvenance
impl Ord for ToolProvenance
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ToolProvenance
impl PartialEq for ToolProvenance
Source§impl PartialOrd for ToolProvenance
impl PartialOrd for ToolProvenance
Source§impl Serialize for ToolProvenance
impl Serialize for ToolProvenance
impl StructuralPartialEq for ToolProvenance
Auto Trait Implementations§
impl Forget for ToolProvenance
impl Freeze for ToolProvenance
impl RefUnwindSafe for ToolProvenance
impl Send for ToolProvenance
impl Sync for ToolProvenance
impl Unpin for ToolProvenance
impl UnsafeUnpin for ToolProvenance
impl UnwindSafe for ToolProvenance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.