Skip to main content
Defined in: testing/transcripts/redact.ts:52 Options for redactTranscript.

Properties

emails?

Defined in: testing/transcripts/redact.ts:54 Redact emails in texts (default true).

phones?

Defined in: testing/transcripts/redact.ts:56 Redact phone-like digit runs (7+ digits) in texts (default true).

ids?

Defined in: testing/transcripts/redact.ts:58 Replace chat/sender/message ids with placeholders (default true).

displayNames?

Defined in: testing/transcripts/redact.ts:64 Display names: 'placeholder' (default) replaces them with <name:N> in the field and in every text; 'drop' removes the field but still redacts the name in texts; 'keep' leaves them untouched.

outboundPatterns?

Defined in: testing/transcripts/redact.ts:70 Apply the email/phone/custom patterns to outbound texts too (default false: outbound texts only get values learned from inbound turns). Replay such a golden with replayTranscript(..., { redact: { ... } }).

surrogates?

Defined in: testing/transcripts/redact.ts:76 Use format-valid surrogates instead of <email:N> / <phone:N> (email1@redacted.invalid, +10000000001), so validation steps in flows accept the redacted input on replay. Default false.

dropStartedAt?

Defined in: testing/transcripts/redact.ts:78 Drop startedAt (the wall-clock start) (default true).

rules?

Defined in: testing/transcripts/redact.ts:80 Extra patterns.

allow?

Defined in: testing/transcripts/redact.ts:82 Values that must never be redacted (e.g. a support phone printed by the bot).

map?

Defined in: testing/transcripts/redact.ts:84 Reuse placeholders across transcripts. Mutated in place.