redact_by_entity
Find and redact PII in a PDF on-device, keeping only the requested entity kinds. Verifies redaction and returns an audit log—nothing is uploaded.
Instructions
Find and redact PII in a PDF in ONE on-device step: scan, keep only the requested entity kinds (email/ssn/phone/card plus the Australian tfn/abn/acn/medicare/crn/ihi/bsb — omit kinds to redact every kind detected), remove them, verify, and return what was redacted plus the audit log. This is the 'just scrub the obvious PII' shortcut; when you need to review before removing, call find_sensitive_regions first. Same caveat as the detector: matches are best-effort pattern matching, not a completeness guarantee and not a compliance assessment. Nothing is uploaded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kinds | No | entity kinds to redact; omit to redact all detected | |
| drawBox | No | also paint a black bar (default: opaque fill only) | |
| pdfPath | Yes | absolute path to the source PDF | |
| regions | No | narrow to these regional packs (intersects with `kinds`); omit for all | |
| outputPath | Yes | absolute path to write the redacted PDF |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audit | Yes | ||
| output | Yes | ||
| verdict | Yes | ||
| redacted | Yes | ||
| redactedCount | Yes |