Skip to content

v0.1.6 — Redaction Mode

Latest

Choose a tag to compare

@cloakllm cloakllm released this 04 Mar 18:26
· 96 commits to main since this release

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
  • mode field 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