# Privacy Veil — Beta

Masks email addresses and environment assignment values in assistant reply text. Environment variable names stay visible, so `API_TOKEN=demo_secret` appears as `API_TOKEN=[value hidden]`. Hover a mask to reveal it temporarily, or click/focus and press Enter to toggle that value. Run `/privacy-veil` to hide all explicitly revealed addresses and values again.

The video feature appears at [00:29–00:36](https://www.youtube.com/watch?v=yUuFvL1lK4k&t=29s) and is built at [02:20–03:02](https://www.youtube.com/watch?v=yUuFvL1lK4k&t=140s).

## What it does

- Hooks only the `AssistantMessage` render component on terminal, Desktop, and VS Code surfaces. Replies without detected addresses or environment assignments use the normal renderer unchanged.
- Recognizes `.env`-style assignment lines: `KEY=value`, `export KEY=value`, optional spacing around `=`, and single- or double-quoted values. The key, export prefix, surrounding quotes, trailing whitespace, and comments remain visible. Empty values remain empty.
- Masks the complete value, including an email inside it, with one control. Email addresses outside the value retain their own controls. It does not display an email fragment from a masked environment value.
- For a quoted value spanning multiple lines, masks each value line until the closing quote. An unmatched quote conservatively masks through the rest of the reply. Composite quoted/unquoted suffixes are also masked rather than partly exposed.
- Draws a visible keyed Box around each mask. A child overlay starts with `display: 'none'` and reveals through `hover: { display: 'flex' }` while that parent is hovered, following the documented Box hover contract. A Button supplies a keyboard/click alternative.
- Handles multiple addresses and value fragments independently. Reloading the mod hides previously revealed text again.
- Keeps reveal choices only in session memory; it neither logs nor persists the detected values. It never reads your real process environment or `.env` files.

## Limits: display masking only

This is **not redaction or a security boundary**. The original addresses and environment values remain in the model context, underlying render tree, stored conversation, exports, and any accessibility/text extraction the host exposes. Text may be revealed under the pointer or after a click. It does not scan user prompts, tool calls/results, external panes, attachments, account UI, or every possible secret syntax. It targets conventional ASCII email addresses and `.env` assignment lines; it is not a shell, JSON, YAML, or arbitrary prose parser. Use one environment assignment per line. It may miss uncommon forms. Review the whole screen before recording or sharing it.

Matching assistant replies use plain text line layout, so their original Markdown/code-block styling and built-in reply controls are not preserved. Replies with nothing to mask retain the standard renderer. The eight native tests cover parser edge cases, valid terminal/Desktop/VS Code render trees, independent reveal/remask, visible keys, and preservation of the source. Actual pointer-hover painting remains a manual check.

## Compatibility and verification

Beta 0.2.0, checked on 22 October 2026 with an isolated Claude Code **2.1.307**. The native `claude plugin validate` and `claude plugin test` commands pass. The tests mount the plugin's UI in Claude Code's real mods runtime with stubbed session/model operations; they do not invoke a paid model or execute tasks. Live authenticated terminal/Desktop sessions and visual pointer hover have **not** been manually verified. The mods API changes between versions; use the declarations your installed build generates as its authority. Claude Code first documented mods in 2.1.287; 2.1.307 is the tested version for this download.

Validation reports a missing catalog icon. These source downloads have not been submitted to Anthropic's plugin directory.

## Load the downloaded folder

1. Extract the download to a directory you control and review `hooks/register.js`.
2. Check your installed version with `claude --version`.
3. Start a session with `claude --plugin-dir /absolute/path/to/privacy-veil`.
4. Run `claude plugin validate /absolute/path/to/privacy-veil` and `claude plugin test /absolute/path/to/privacy-veil` to check against your build.

For Desktop, load the folder through the plugin-directory settings supported by your current build. The official video describes global settings; the exact setting varies with the installed release. The terminal command above is the reproducible loading path tested here.

Removing the `--plugin-dir` option on the next session unloads the mod. No external service, npm dependency, extra API key, project file mutation, or system configuration change is required by this plugin. Normal Claude Code access and billing still apply.

## Sources and authorship

Original JustADev implementation, MIT licensed. Inspired by Anthropic's [Mods in Claude Code video](https://www.youtube.com/watch?v=yUuFvL1lK4k), published 5 October 2026. Consult the [official getting started guide](https://claude.dev/blog/getting-started-with-claude-code-mods/) and [public mods API declarations](https://github.com/anthropics/claude-code/blob/main/mods/types/claude-code.d.ts). This plugin is independently published by JustADev and is not an Anthropic product.
