DeepSeek Harness 插件

dsh-privacy-mask

Display-only privacy mask for DeepSeek Harness chat: regex → ***, hover to reveal; copy and LLM context unchanged.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
Huauauaa/dsh-privacy-mask
最近更新
2026年8月20日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-21

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/Huauauaa/dsh-privacy-mask
插件名:dsh-privacy-mask
作者:Huauauaa

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

dsh-privacy-mask

Display-only privacy mask for the DeepSeek Harness (dsh) web UI. Regex matches in chat text render as a placeholder (default *); hover reveals the original. Copy, selection, and LLM context are unchanged**.

What it does

  • Scans user messages, assistant body text, and tool/result cards in the conversation DOM
  • Wraps regex matches in a CSS mask — the DOM still holds the original text
  • Shows a configurable placeholder instead of matched substrings; hover reveals the real value
  • Built-in rules for common secret shapes (API keys, Bearer tokens, email, PEM headers) plus custom rules
  • Settings page section Privacy mask (open via the bottom-left Settings button)

What it does not do

  • Does not redact session data, exports, telemetry, or model/tool payloads
  • Does not change what the LLM sees or what gets stored server-side
  • Does not alter clipboard output — copy/paste still yields the original secret text

Config still lives in browser localStorage (not Host settings.plugin.item); see [Configuration storage](#configuration-storage).

Install

From a checkout of this repo:

dsh plugin --profile web add /absolute/path/to/privacy

Then restart (or reload) the web profile so the client bundle loads.

lib/client.js is a classic-script ModuleLoader factory (window.__ModuleLoader__.load, id dsh-privacy-mask), self-contained for the browser.

Dev overlay (optional): dsh web --patch ./cordis.patch.yml with absolute plugin paths per dsh docs.

Settings

Open the bottom-left Settings control, then choose Privacy mask in the settings nav.

FieldDescription
EnabledMaster switch. Off unwraps all masks and stops scanning.
PlaceholderText shown instead of matches (default ***).
RulesOrdered list. Each rule has an enable toggle, name, and regex pattern.

Per rule:

  • Builtin rules — name and pattern are read-only; you can disable them but not delete or edit the pattern.
  • Custom rules — fully editable; use Delete to remove. Add rule appends a blank custom row.

Actions:

  • Save — validates every pattern; invalid regex or empty/whitespace-only patterns show an inline error and are not written.
  • Reset to defaults — restores built-in rules and default placeholder immediately.

Storage key: dsh-privacy-mask:v1 in localStorage. After changing package.json client injects, restart the web profile so __DSH_BOOT__ picks up slots.

Default built-in rules

All enabled by default:

| Name | Pattern (JS RegExp source) | |------|----------------------------| | API key-like | \b(?:sk-or-\|sk-\|rk-)[A-Za-z0-9_\-]{16,}\b | | Bearer token | \bBearer\s+[A-Za-z0-9\-._~+/]+=* | | Email | \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b | | PEM private key header | -----BEGIN [A-Z0-9 ]*PRIVATE KEY----- |

The API-key rule is intentionally conservative; disable it if you see false positives.

Tests

npm test

Runs Node node:test suites for mask-core (match/segment contract), writeConfig (persist + invalid/empty-pattern rejection), and conversation selectors. Tests import ESM sources (lib/mask-core.js, lib/settings-store.js, lib/selectors.js); the browser file inlines those.

Compatibility / DOM selectors

DSH web UI markup can change between versions. If masking misses the chat or hits the wrong area, edit lib/selectors.js (keep the inlined copy in lib/client.js in sync):

  • conversationRoots() — scan start: prefers [data-conversation-scroll], then [role="log"] / [data-testid="conversation"], then main, then document.body
  • shouldSkip() — ignores composer ([data-composer-seat] / [data-composer-card]), sidebar ([data-slot="sidebar"]…), inputs/contenteditable, shell overlays, the settings panel, and nodes already masked

Prefer stable data-* / roles over hashed class names. On first install, still verify in DevTools that the transcript root and composer markers match your dsh build.

Configuration storage

The Privacy mask page is registered as a Settings nav section (settings.section). Values still persist in browser localStorage, not Host settings.plugin.item.

Public dsh rc builds enforce a WEB_SETTINGS_NAMESPACES allowlist that blocks third-party plugin namespaces from the Host settings store. Until that allowlist includes privacy-mask, localStorage remains the persistence path. The Host entry (lib/index.js) is a no-op mount marker only.

Manual smoke checklist

After install into a web profile:

1. Send or view a message containing a fake Bearer token (e.g. Authorization: Bearer abc.def-123) — UI should show the placeholder. 2. Hover the masked span — original text appears. 3. Select and copy — clipboard contains the original token, not *. 4. Disable the Bearer rule (or master Enabled**) and save — text renders plainly.