pub struct ConsentGateConfig {
pub enabled: bool,
pub confirm_threshold: String,
pub disclose_threshold: String,
pub audit_all: bool,
}Expand description
Configuration for the write-time memory-consent gate, nested under [memory.consent_gate]
in TOML (issue #6490).
Gates memory writes derived from untrusted content (tool output, web scrapes, MCP
responses) behind either an interactive confirmation (memory_save tool path) or a
visible in-turn disclosure note (autonomous background tool-output writes, which must
never block on Channel::confirm per the non-blocking contract — see spec-039).
confirm_threshold/disclose_threshold accept the snake_case serialization of
zeph_sanitizer::ContentTrustLevel ("trusted", "local_untrusted",
"external_untrusted"). zeph-config cannot depend on zeph-sanitizer (the dependency
runs the other way), so these are plain strings parsed by callers via
ContentTrustLevel::from_str_opt.
§Example (TOML)
[memory.consent_gate]
enabled = true
confirm_threshold = "external_untrusted"
disclose_threshold = "local_untrusted"
audit_all = trueFields§
§enabled: boolMaster switch. Default: true.
confirm_threshold: StringMinimum trust tier (inclusive) that requires interactive confirmation via
Channel::confirm on the memory_save tool path. Default: "external_untrusted".
disclose_threshold: StringMinimum trust tier (inclusive) that requires a visible in-turn disclosure note on
autonomous background tool-output memory writes. Default: "local_untrusted".
audit_all: boolWhen true, every memory write is recorded in the audit log with source
attribution, regardless of trust tier. Default: true.
Trait Implementations§
Source§impl Clone for ConsentGateConfig
impl Clone for ConsentGateConfig
Source§fn clone(&self) -> ConsentGateConfig
fn clone(&self) -> ConsentGateConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more