pub struct PiiScrubbingDumpSink { /* private fields */ }Expand description
Wraps a DebugDumper with a zeph_sanitizer::pii::PiiFilter so sub-agent-executed LLM
calls get the same optional PII-redaction layer top-level dumps receive via
DebugState::write_chat_debug_dump
— the baseline scrub_content/redact_binary_blobs pass inside DebugDumper::dump_response
always applies, but the extra PiiFilter.scrub() layer is opt-in per config and was
previously only wired into the top-level path (#6407).
Implementations§
Source§impl PiiScrubbingDumpSink
impl PiiScrubbingDumpSink
Sourcepub fn new(inner: DebugDumper, pii_filter: PiiFilter) -> Self
pub fn new(inner: DebugDumper, pii_filter: PiiFilter) -> Self
Wraps inner so every DebugDumpSink::dump_response
call is scrubbed through pii_filter before being written to disk.
Trait Implementations§
Source§impl DebugDumpSink for PiiScrubbingDumpSink
impl DebugDumpSink for PiiScrubbingDumpSink
Source§fn is_trace_format(&self) -> bool
fn is_trace_format(&self) -> bool
Returns
true when the active dump format does not need provider_request built
(e.g. Trace format, which records spans instead of numbered files) — callers can
skip the (non-free) request serialization in that case.Source§fn dump_request(
&self,
model_name: &str,
messages: &[Message],
tools: &[ToolDefinition],
provider_request: Value,
) -> u32
fn dump_request( &self, model_name: &str, messages: &[Message], tools: &[ToolDefinition], provider_request: Value, ) -> u32
Dump the outgoing request. Returns an id that must be passed to
dump_response
to correlate the pair.Source§fn dump_response(&self, id: u32, response: &ChatResponse)
fn dump_response(&self, id: u32, response: &ChatResponse)
Dump the response paired with a prior
dump_request call.Auto Trait Implementations§
impl Freeze for PiiScrubbingDumpSink
impl RefUnwindSafe for PiiScrubbingDumpSink
impl Send for PiiScrubbingDumpSink
impl Sync for PiiScrubbingDumpSink
impl Unpin for PiiScrubbingDumpSink
impl UnsafeUnpin for PiiScrubbingDumpSink
impl UnwindSafe for PiiScrubbingDumpSink
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request