DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-mask

Mask

DeepSeek Harness 的 PII 脱敏中间件:使用正则表达式检测电话号码、电子邮件、身份证、银行卡、密钥以及(可选)IP 地址,并在数据到达模型前将其替换为占位符;将还原表保留在主机端(内存加受控存储域,ne

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:PerryLink/dsh-mask#081540fe07223c2bc1709d3de0e87989d9a5e740
README兼容性版本

兼容性与来源证明

Mask 以 dsh-mask 发布,当前版本为 0.2.23。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/11/4

版本

0.2.23stable
2026/10/24
0.2.22stable
2026/10/18
0.2.20stable
2026/10/10
查看其余 24 个版本收起版本
0.2.19stable
2026/10/5
0.2.18stable
2026/10/5
0.2.17stable
2026/10/5
0.2.16stable
2026/10/4
0.2.15stable
2026/9/24
0.2.14stable
2026/9/24
0.2.13stable
2026/9/23
0.2.12stable
2026/9/19
0.2.11stable
2026/9/18
0.2.10stable
2026/9/12
0.2.9stable
2026/9/12
0.2.8stable
2026/9/10
0.2.7stable
2026/9/9
0.2.6stable
2026/9/9
0.2.5stable
2026/9/7
0.2.4stable
2026/9/7
0.2.3stable
2026/9/4
0.2.2stable
2026/9/1
0.2.1stable
2026/8/27
最新版
0.2.23
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
Apache-2.0
发布源
github
GitHub
★ 17
周下载
614
最近提交
2026/11/4
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
0.2.0
stable
2026/8/26
0.1.4stable
2026/8/23
0.1.3stable
2026/8/22
0.1.2stable
2026/8/21
0.1.1stable
2026/8/17

README

dsh-mask

  • 1024 store channel: npm i -g dsh1024 once, then dsh1024 plugin --profile web add dsh-mask (counts toward the deepseek1024.com install ranking). OpenSSF Scorecard

PII masking middleware for DeepSeek Harness — anonymize personal data before it reaches the model, keep it reversible host-side.

Phones, emails, ID cards, bank cards, keys, and more become placeholders at the model boundary; the plaintext never enters your session log.

DSH Market

English · 简体中文 · Español · Português · हिन्दी

dsh plugin --profile <name> add dsh-mask

📖 Ecosystem knowledge base — measured data, not marketing: plugin development guide · plugin-selection data · maintenance criteria.

Install & uninstall

  • git channel (latest main): dsh plugin --profile web add github:PerryLink/dsh-mask (equivalent to installing from git+https://github.com/PerryLink/dsh-mask.git). No build step — index.mjs and lib/ are the shipped artifacts.
  • npm channel (published releases): dsh plugin --profile web add dsh-mask.
  • tarball channel: pnpm pack in this repo, then dsh plugin --profile web add ./dsh-mask-<version>.tgz.
  • uninstall: dsh plugin --profile web remove dsh-mask (or remove the row from the profile patch).

dsh-mask no longer bundles the storage stack. Profiles that already compose it (the web profile does, via @deepseek-ai/dsh-web-app) provide storageDomain, so persistence works out of the box. On a bare profile without storage the plugin still mounts and masks, but the restore table is memory-only (lost on restart) — compose the storage stack in your profile patch, or set persistRestoreTable: false.

⭐ 如果它帮到了你

这个插件是 DSH 插件家族的一员(95 个,全部 Apache-2.0)。如果你在用,给个 star —— 它不会解锁任何功能,但会让下一个人在搜索里更容易找到它。

English: part of a 95 plugin family for DeepSeek Harness. If it is useful, a star helps the next person find it — nothing is gated behind it.

What is dsh-mask?

PII masking middleware for DeepSeek Harness — anonymize personal data before it reaches the model, keep it reversible host-side.

Phones, emails, ID cards, bank cards, keys, and more become placeholders at the model boundary; the plaintext never enters your session log.

Workflow diagram for dsh-mask: call → plugin → result.

Workflow overview: call → plugin → result. The examples below use the real command surface.

Comparison

Measured comparison chart for dsh-mask

108 synthetic samples (60 positive, 48 negative) · from benchmark/RESULTS.md

Compatibility

SurfaceStatus
HarnessDeepSeek Harness dsh-v0.2.1-alpha.1 (adapted 2026-09-18): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged. Verified 2026-09-18 against the dsh-v0.1.7-alpha.1 master checkout (full gate chain + profile install smoke).
Node^22.19.0 || >=24.0.0
PlatformsAnywhere DSH runs (pure host, zero-dependency regex; no browser half)
ModelText models fully supported; no extra model capability required

What you get

dsh-mask anonymizes personal data at the model boundary — before a message reaches the model — and keeps a restore table host-side so placeholders stay reversible:

  • Request-time masking — agent/pre-step messages are rewritten so phones, emails, ID cards, bank cards, and keys (on by default) and IPs (opt-in) become <PHONE_1>-style placeholders. The masked text is what gets logged and sent to the model.
  • Restore table — the placeholder → original map lives only in memory and a controlled storage domain (dsh_mask); the plaintext never enters the session log.
  • Audit, not plaintext — the mask/applied session event records only "replaced N values + type distribution", never the original text or the mapping.
  • /mask command — status (counts + distribution), on/off (runtime toggle), restore <text> (unmap placeholders and deliver the plaintext as a file, never as logged text), help.
  • mask_test tool — run a snippet through the detector and see the placeholder result; it never reveals the original values.
user message ──agent/pre-step──▶ placeholders ──model──▶ placeholders ──restore──▶ controlled file
                                   ▲                                                      │
                                   └──────── restore table (memory + dsh_mask) ───────────┘

Quick start

dsh plugin --profile web add github:PerryLink/dsh-mask
# 1. install the bundle into your profile
dsh plugin --profile web add github:PerryLink/dsh-mask

# or from npm (published releases)
dsh plugin --profile web add dsh-mask

# 2. verify the row mounts
dsh --profile web --dump-config | grep -A2 'id: mask'

Then tailor the entity list in your profile patch:

- insert:
    - id: mask
      name: dsh-mask
      config:
        entities: [phone, email, id-card, bank-card, key]
> /mask status
> /mask restore <PHONE_1>
mask: restored 1 placeholder(s): <PHONE_1>
  file: /tmp/dsh-mask-restore/restore-1f0c….txt  (mode 0600, one file per session)

Examples

These are the plugin's real entry points; install once, then call one.

Detailed example

Command

mask_test

Input

{"text":"电话 13812345678"}

Output

mask_test: replaced 1 PII value(s) (PHONE=1)
masked:
电话 <PHONE_1>

Observed from plugins/dsh-mask/index.mjs:243-250; test/index.test.mjs:306-315

Failure branch

Input

/mask restore <PHONE_1> with restoreDir=/tmp/dsh-mask-probe-not-a-dir (a regular file)

Output

mask: restore failed: EEXIST: file already exists, mkdir '/tmp/dsh-mask-probe-not-a-dir'

Observed from plugins/dsh-mask/index.mjs:501-506; plugins/dsh-mask/lib/deliver.mjs:89-97; plugins/dsh-mask/test/index.test.mjs:278-290

Brief examples

  • mask_test
  • /mask restore <text>

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.

KeyDefaultMeaning
enabledtrueMaster switch; false unregisters the listener, the /mask command, and the mask_test tool
moderegexDetection mode; only regex is implemented (regex+ner for name/address recognition is reserved and fails loud)
entities[phone, email, id-card, bank-card, key]Which PII types to mask; ip is also regex-capable (opt-in), person/address require NER
scope[messages]Masking surface(s); messages masks agent/pre-step messages, tools masks tool-result text on tools/post-execute. Accepts a string or an array, e.g. [messages, tools]
registerCommandtrueRegister the /mask command
registerToolstrueRegister the mask_test tool when the tools service is present
persistRestoreTabletruePersist the restore table to the controlled dsh_mask storage domain (false = memory only)
maxRestoreEntriesPerSession500Per-session restore entry cap (oldest evicted first)
maxSessions1000In-memory session cap (least-recently-used evicted, mapping reloaded on demand)
maskClientEnabledfalseFeature flag for the browser half "reveal" bubble (defensive; off by default until the live slot catalog verifies the target slot). The key is schema-declared and validated, but no runtime code reads it yet, so it changes nothing until the browser half ships
restoreDir''Where /mask restore delivers the restored plaintext. Empty = os.tmpdir()/dsh-mask-restore; a relative value resolves against the host process working directory. The directory is created and the file written , one file per session

Example override in your profile patch:

- insert:
    - id: mask
      name: dsh-mask
      config:
        entities: [phone, email, id-card, bank-card, key, ip]
        persistRestoreTable: false
        registerCommand: true

Tools & surfaces

SurfaceReveals plaintextNotes
agent/pre-step maskingneverRewrites messages to placeholders before they are logged or sent to the model
tools/post-execute maskingneverRewrites tool-result text blocks to placeholders before they are logged or fed back to the model (scope: tools)
/mask statusneverEnabled state, total replaced, type distribution
/mask on / /mask offneverRuntime toggle (resets to config.enabled on restart)
/mask restore <text>yes (explicit)Unmaps placeholders back to the values stored for this session and writes them to a controlled file (one per session, mode 0600); the result text and the session log carry only that path and the placeholder names
mask_testneverMasks a snippet and reports the placeholder result + counts

Permissions & data

  • Permissions: dsh-mask performs no network requests and stores no credentials; it reads the session at the agent/pre-step boundary, writes its own dsh_mask storage domain, and writes the /mask restore delivery file (the manifest declares filesystem:write for exactly that). The dshWorkshop manifest also declares network:none and credentials:none.
  • Data: the placeholder → original restore table lives in memory and, when persistRestoreTable: true, in the controlled dsh_mask storage domain — it is never written to the session log. The only other plaintext copy is the delivery file an explicit /mask restore writes under restoreDir (mode 0600, one file per session, overwritten by the next restore); nothing writes plaintext to disk implicitly.
  • Session log: mask/applied is declared in types.d.ts and appended only when the host records the type (see Known limitations). Its payload is counts + type distribution only.

Security boundaries

  • Plaintext never enters the session log. The masked (placeholder) form is what gets logged and sent to the model, so model-visible content is reconstructable from the log in placeholder form; the originals stay in the restore table. The same rule governs the reveal direction: a command's result text is logged verbatim by the host and rendered from that same event, so /mask restore writes the plaintext to a controlled file and returns only its path.
  • Sanitize before display/log. lib/sanitize.mjs redacts PII, secrets, and URL credentials before any text reaches the model or the log; mask_test, /mask status, and every /mask error path never echo originals.
  • Controlled restore. /mask restore is the single explicit reveal surface, and it only reads the mapping for the active session. Failure fails closed: if the delivery file cannot be written, the command reports an error and never falls back to echoing the plaintext.
  • Fail closed. Unimplemented mode (regex+ner), unknown scope values, NER-only entities, and out-of-bounds numbers all fail loudly at load.
  • Registrations are effects. The listener, command, tool, and storage-domain close are all Cordis effects — stop/hot-reload removes them.

Known limitations

  • Regex only. Name (person) and address (address) recognition needs an external NER recognizer, which the pure-host zero-dependency form does not bundle; mode: regex+ner and those entities fail loudly at load. The PII types covered out of the box are phone, email, ID card, bank card, key, and (opt-in) IP.
  • Region-specific patterns. The phone and id-card detectors match mainland-China formats only: phone is 1[3-9] followed by nine digits, and id-card is an 18-character Chinese resident ID (17 digits plus a digit or X). Phone numbers and national identifiers from other countries are not detected. email, ip, and key are region-agnostic; bank-card accepts any 16-19 digit run at a lower confidence score.
  • Display-layer restore needs a client half. Masking is fully host-side, but transparently un-masking the assistant bubbles in the client UI is a browser-half feature this pure-host form does not ship. The host side keeps the restore table and the exported RestoreStore seam (its methods take a session id), so a future client half would reach them through a host remote rather than directly; today the unmasking surface is the /mask restore <text> command, which delivers the plaintext as a file because a command result is logged verbatim (see Security boundaries), and the maskClientEnabled key is validated but read by no runtime code yet.
  • No no-argument /mask restore. Restoring every placeholder of the most recent assistant message is not offered, and the command says so when invoked without text. Two host facts block it: the restore table is a flat per-session {placeholder: original} map with no per-message index, so that message has to be located in the session event log; and the host deprecated Session.snapshotEvents() / eventAt() / ownEvents() with an explicit "new calls are prohibited", leaving an incremental projection as the only sanctioned route — which this plugin's declared host corridor (>=0.1.2-rc.1) cannot rely on. Placeholders keep working one at a time instead: /mask restore <PHONE_1>.
  • Session events on 0.1.7-rc.2. The harness records 59 session event types and none of them is mask/*; its Session.append also cannot stamp the ignorable envelope, so the session-log audit appends are skipped and sessions keep loading. The gate is not silent about it: the first refusal per session logs one visible warning naming the skipped type and this documented limitation. The plugin enables the append automatically once a host records the type or supports the envelope.

Development

pnpm install                                       # node ^22.19 || >=24
pnpm run typecheck && pnpm run typecheck:ci        # two rulers: checkout face (guarded; unverifiable without the checkout) + published-line face
pnpm test                                          # node --test
pnpm run verify:self-contained                     # dependency specs resolve from the registry
pnpm run verify:artifacts                          # shipped files present + index.mjs importable
pnpm run check:readmes                             # five-language README consistency
pnpm pack                                          # the published tarball

There is no build step: pure ESM, index.mjs and lib/ are the shipped artifacts.

Benchmark

The PII benchmark (per-type P/R/F1 over 108 synthetic samples) is published in benchmark/RESULTS.md; regenerate it with node benchmark/run.mjs (no build step, zero new dependencies).

Interoperability with other DSH plugins

Verified against DSH 0.2.0-rc.2 (the runtime this README ships for) and the high-star plugin set surveyed on 2026-10-05.

This plugin does not interfere with other plugins, including the widely installed high-star ones:

  • No tool-name collision. Every tool is namespaced; no bare name owned by a shipped tool or another plugin is registered.
  • No service-key collision. It provides no service key at all, so it cannot collide on one.
  • No slot collision. It registers no client slot key, so it cannot contend for a shadows-shipped-ui seat.
  • No HTTP route collision. It registers no webServer prefix.
  • No patch-layer collision. The bundle patch only inserts its own row; it never overrides a built-in row's config.
  • No global mutation. It does not patch prototypes, rewrite process.env, or replace the global fetch dispatcher.

Shared event listeners are non-interfering by construction. It observes the ordering-sensitive events agent/pre-step, tools/post-execute with ctx.on() — Cordis's broadcast registration, where every listener runs and none can starve another. Every listener here delegates through next(), so the chain is never short-circuited, and a mutation is applied to the value next() produced rather than returned in its place:

  • agent/pre-step — also used by dsh-routing-suite (7000★, 7 listeners), modlens (4122★), dsh-purge (3317★), dsh-agent-teams (1923★), dsh-context (1849★).
  • tools/post-execute — also used by cc-safety-net (1576★).

Static evidence: dsh-plugin-doctor K10–K13 report pass for every check on this repository.

Topics

dsh, dsh-plugin, deepseek-harness, deepseek, cordis, pii, mask, privacy, anonymization, security

Contributors

  • @PerryLink — creator and maintainer: the regex PII detector ported from Pii-Stripper-Middleware, the agent/pre-step masking seam, the restore table, the /mask command and mask_test tool, and the five-language docs.

PerryLink DSH Plugin Family

This project is part of the DeepSeek Harness plugin family from PerryLink. The roster stays collapsed below so every README keeps a short first screen; expand it to see every row and its status.

Expand all plugins
PluginStatus
dsh-aqua-input-check
dsh-archive-check
dsh-auto-review
dsh-autotier
dsh-bid-ca-precheck
dsh-bid-qual-check
dsh-cert-mcp
dsh-checkpoint-rewind
dsh-click
dsh-composer-history
dsh-contract-stance
dsh-customs-doc-check
dsh-data-quality

License

LICENSE (Apache License 2.0) © 2026 dsh-mask contributors

0700
0600
ignorable
dsh-demurrage-ledger
dsh-doublecheck
dsh-drill-script-check
dsh-eia-guide-check
dsh-emergency-plan
dsh-essay-rubric-check
dsh-evidence-check
dsh-export-ctl-check
dsh-fast
dsh-fmea-table-check
dsh-forecast-penalty
dsh-fund-research
dsh-github
dsh-gongwen-flow-check
dsh-gongwen-word-check
dsh-guard-plan-qc
dsh-hazchem-check
dsh-hazplan-check
dsh-hidden-risk-map
dsh-hs-classify
dsh-icd-rule-check
dsh-industry-research
dsh-lawcite-adapter
dsh-laya
dsh-lc-doc-check
dsh-learning-gap-check
dsh-library
dsh-local-ai
dsh-lsp-actions
dsh-mask
dsh-mcp-panel
dsh-medrec-qc
dsh-memento
dsh-nsfc-form-check
dsh-nurse-record-check
dsh-observe
dsh-origin-rvc-check
dsh-ota-review-check
dsh-output-styles
dsh-paper-doc-adapter
dsh-permission-rules
dsh-permit-report-check
dsh-pipeline-check
dsh-pleading-draft
dsh-plugin-doctor
dsh-plugin-guide
dsh-plugin-kit
dsh-plugin-upgrade
dsh-policy-brief-draft
dsh-power-loss-split
dsh-power-ticket-check
dsh-ppap-check
dsh-protest-deadline
dsh-railway-window
dsh-repair-order-qc
dsh-research-report
dsh-review-reply-check
dsh-rulefile-check
dsh-safety-brief-check
dsh-score
dsh-session-sync
dsh-site-log-check
dsh-skill-pack-security
dsh-soe-decision-check
dsh-soilwater-check
dsh-sop-sync-check
dsh-spc-gbt-adapter
dsh-talk
dsh-tender-extract
dsh-tender-matrix
dsh-test-drive
dsh-ticktick
dsh-translate
dsh-warranty-calc
dsh-budget🧊 FROZEN — see the repo README
dsh-claude-move🧊 FROZEN — see the repo README
dsh-defend🧊 FROZEN — see the repo README
dsh-draw🧊 FROZEN — see the repo README
dsh-reach🧊 FROZEN — see the repo README
dsh-background-agents🚫 RETIRED — see the repo README
dsh-session-pin🚫 RETIRED — see the repo README
dsh-team-rooms🚫 RETIRED — see the repo README