redactgate
PLUGINReversible PII pseudonymization at the model boundary.
by ctmakc · v1.0.0
What it does
Reversible PII pseudonymization at the model boundary. Names, e-mails, phones, payment cards, IBANs and national IDs (CA, US, EU, UA) become [[TYPE_xxxxxx]] placeholders in every main-loop model request, across all roles, tool-call arguments, tool results and the system prompt (Chat Completions, Anthropic Messages and Responses shapes).
Real values come back in the reply (transform_llm_output with hold_stream) and in the arguments of local tools only (terminal, file tools, execute_code, memory, clarify); web, browser, MCP, other plugins' tools and subagents keep placeholders. Checksum-validated detection (Luhn, mod-97), offset-preserving Unicode normalization, HMAC placeholders per session kept in memory, fail-closed on error, hash-chained audit journal, /redact command (status, what the model received, dry run, audit, verify, custom terms).
Flags auxiliary calls that carried personal data, and /redact harden turns off model-made session titles. Disclosure — no network calls, no model downloads, no shell commands, subprocesses, background threads, credentials or telemetry; standard library only.
Writes only in its plugin data folder: audit.jsonl (entity type counts, tool names, provider host, hashed session ids; never values) and its state.json (random HMAC secret, user-added terms). Reads the merged Ulpi config read-only; writes Ulpi config only when the user runs /redact harden (auxiliary.title_generation.model_upgrade_enabled = false).
The transform_llm_output hook holds the reply stream until values are restored, so commentary between tool calls is not shown on streaming surfaces. Detection core vendored from RedactGate (same author, AGPL-3.0); see DISCLOSURE.md for what predates the hackathon.
Review notes
What an owner reads and accepts before the install is approved.
- Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve