dsh-text-guard
在记录会话前过滤或替换特定字符序列 适合需要在会话日志和工具结果中脱敏或屏蔽特定字符的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:7771sd/dsh-text-guard说明文档
阅读完整 README ↗Configuration
The shipped bundle patch mounts it with the wide mode. Every field can be overridden in your profile's cordis.patch.yml:
- id: text-guard
config:
mode: exact
sequences: [[0x1F1F9, 0x1F1FC]]
replacement: '[flag U+{codepoints}]'
toolResults: true
userMessages: true
log: true
| Field | Default | Meaning |
|---|---|---|
mode | regional-pairs | regional-pairs matches any two consecutive regional indicators (U+1F1E6–U+1F1FF); exact matches the configured sequences only. |
sequences | [[0x1F1F9, 0x1F1FC]] | Code-point sequences mode: exact neutralizes; each entry is matched consecutively. |
replacement | [flag U+{codepoints}] | Replacement template; every {codepoints} becomes the matched code points, for example U+1F1F9 U+1F1FC. |
toolResults | true | Neutralize accepted tool results and run_code dispatch logs. |
userMessages | true | Neutralize the messages entering a step. |
log | true | Log one summary line per affected dispatch, naming the count and never the matched text. |
Configuration changes are not hot: re-mount the bundle (disable and enable it) after editing the patch.