pub struct ContentTrustConfig {
pub trusted_mcp_servers: Vec<String>,
pub untrusted_tools: Vec<String>,
pub trusted_tools: Vec<String>,
}Expand description
Which tool sources count as untrusted for memory purposes (§10.1).
Mirrors Codex’s pollutes_memory posture: web/fetch and provider-native
search are always untrusted; MCP servers are untrusted by default with an
explicit trusted_mcp_servers allowlist. Note meerkat’s
ToolAccessPolicy::AllowList is invocation gating and cannot serve this
role.
Fields§
§trusted_mcp_servers: Vec<String>MCP servers whose tools do not taint. Joinable in P1 only for
server-qualified tool names (mcp__<server>__<tool>).
untrusted_tools: Vec<String>Explicit tool names that taint the session when their results enter context. The escape hatch for unqualified MCP tool names.
trusted_tools: Vec<String>Explicit tool names that never taint (cannot override the builtin
web/fetch class or untrusted_tools).
Implementations§
Source§impl ContentTrustConfig
impl ContentTrustConfig
Sourcepub fn from_json_value(value: &Value) -> Result<Self, String>
pub fn from_json_value(value: &Value) -> Result<Self, String>
Fail-loud JSON parse for the gateway config block
agent_memory.content_trust { ... }. Unknown fields and wrong types
are errors, never silently ignored.
Sourcepub fn classify_tool(&self, name: &str) -> ToolContentTrust
pub fn classify_tool(&self, name: &str) -> ToolContentTrust
Classify a tool by NAME (the only fact the observe-stream event
surface carries - module docs). Precedence: builtin web/fetch
(non-overridable) > untrusted_tools > trusted_tools >
MCP-qualified names against the server allowlist > trusted.
Sourcepub fn classify_tool_with_provenance(
&self,
name: &str,
provenance: Option<&ToolProvenance>,
) -> ToolContentTrust
pub fn classify_tool_with_provenance( &self, name: &str, provenance: Option<&ToolProvenance>, ) -> ToolContentTrust
Classify a tool with the typed ToolDef.provenance owner when the
caller has it (the dispatch-time join - module docs). Precedence is
Self::classify_tool’s, with the MCP step widened: typed
ToolSourceKind::Mcp provenance attributes the tool to
provenance.source_id regardless of the name shape; absent or
non-MCP provenance falls back to the mcp__<server>__<tool> name
join. Explicit trusted_tools entries still override server-level
distrust, exactly as on the name-only path.
Trait Implementations§
Source§impl Clone for ContentTrustConfig
impl Clone for ContentTrustConfig
Source§fn clone(&self) -> ContentTrustConfig
fn clone(&self) -> ContentTrustConfig
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 ContentTrustConfig
impl Debug for ContentTrustConfig
Source§impl Default for ContentTrustConfig
impl Default for ContentTrustConfig
Source§fn default() -> ContentTrustConfig
fn default() -> ContentTrustConfig
Source§impl<'de> Deserialize<'de> for ContentTrustConfig
impl<'de> Deserialize<'de> for ContentTrustConfig
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 ContentTrustConfig
Source§impl PartialEq for ContentTrustConfig
impl PartialEq for ContentTrustConfig
Source§impl Serialize for ContentTrustConfig
impl Serialize for ContentTrustConfig
impl StructuralPartialEq for ContentTrustConfig
Auto Trait Implementations§
impl Freeze for ContentTrustConfig
impl RefUnwindSafe for ContentTrustConfig
impl Send for ContentTrustConfig
impl Sync for ContentTrustConfig
impl Unpin for ContentTrustConfig
impl UnsafeUnpin for ContentTrustConfig
impl UnwindSafe for ContentTrustConfig
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> CoreExecutorTurnFinalizationGuard for Twhere
T: Send,
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
key and return true if they are equal.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 more