Repository navigation
Redaction Mode
Irreversible PII removal for GDPR right-to-erasure and data minimization.
Added
- Redaction mode:
new ShieldConfig({ mode: 'redact' })replaces entities with[CATEGORY_REDACTED] - No token map stored in redact mode —
desanitize()is a no-op modefield in audit log entries- TypeScript type support for mode option
- 8 new tests for redaction mode (total: 88 tests)
Usage
const { Shield, ShieldConfig } = require('cloakllm');
const shield = new Shield(new ShieldConfig({ mode: 'redact' }));
const [redacted] = shield.sanitize('Email john@acme.com about Sarah Johnson');
// "Email [EMAIL_REDACTED] about [PERSON_REDACTED]"Full Changelog: v0.1.5...v0.1.6