Expand description
Security utilities for PII protection and data sanitization
Constants§
- MAX_
PREVIEW_ LENGTH - Maximum length for message previews to prevent PII leakage
Functions§
- redact_
pii - Redact PII patterns from text (emails, phone numbers, credit cards)
- safe_
preview - Create a safe preview of text by truncating and redacting PII
- sanitize_
json - Sanitize a JSON value by redacting sensitive fields
- sanitize_
tool_ payload - Sanitize tool payload for safe logging/broadcasting
- truncate_
string - Truncate a string to a maximum length, adding ellipsis if truncated