eri64/dsh-claude-ux 预览 preview

eri64/dsh-claude-ux

DSH插件:为DeepSeek Harness网页版提供Claude风格的中文风险控制与对话自主性

Project Overview项目介绍

dsh-claude-ux is a native plugin built exclusively for DeepSeek Harness, designed to replicate Claude’s signature regional access control and autonomous conversation termination behaviors on DSH’s web profile. It can be installed with a single command: npx -y @deepseek-ai/dsh plugin --profile web add github:eri64/dsh-claude-ux, which automatically handles registration after download. No manual configuration file edits are required, and the same command can be used to update the plugin to its latest version after initial installation. After installation, users only need to restart the DSH web profile and hard refresh their browser to access the dedicated settings tab for the plugin.

The plugin supports two modes of regional control: standard, which blocks users from a specified target region, and reverse, which blocks users who are not from the target region. When a user matches the blocked criteria, the plugin applies a stepped penalty: it first sends a refusal message that counts attempts, then ends the session after a configurable number of attempts. It can also inject region-specific system prompts into the model to align behavior with regional requirements. For abusive or harmful content, the plugin will warn and then end the conversation automatically, following Claude’s original content policies that exclude self-harm content from triggering termination.

By default, the plugin disables all external calls like IP lookup and WebRTC detection, so all regional checks run locally on the user’s device and no data is sent to third-party services. This default privacy-focused setup avoids unnecessary data exposure, and the plugin is released under the permissive MIT open source license. The plugin is disabled by default after installation to prevent users from accidentally locking themselves out of their DSH instance, and users can toggle it on from the settings tab after confirming their configuration. It also includes 132 unit tests covering core functionality, so developers can modify or extend the plugin easily for custom use cases.

这是一款专为 DeepSeek Harness 开发的原生插件,复刻了 Claude 的区域风控与自主结束对话功能,适配 DSH 的 web 配置文件。默认情况下所有检测逻辑都在本地运行,仅有的两个可选外部调用(IP 归属查询、WebRTC 探测)默认关闭,保障用户隐私。它既支持常规的指定区域用户风控,也支持反向风控,可根据需求设置拦截目标区域或非目标区域的用户访问。

当用户命中区域风控规则后,插件会按照阶梯式惩罚机制处理:先发送带尝试次数的拒绝文案,达到设定次数后直接结束会话,还可向模型注入区域级指令。针对辱骂或严重有害内容,插件会先警告再主动结束对话,自伤或他伤相关内容则永远不会触发结束会话。所有参数和自定义文案都可以在设置页的专属标签栏中调整,操作方便。

插件仅需一条 npx 命令即可完成安装,安装后会自动完成注册,不需要用户手动修改任何配置文件。安装完成后只需要重启 DSH web profile 并刷新浏览器就能启用,默认关闭功能避免用户意外将自己锁在外面。插件采用 MIT 许可证,默认配置关闭所有外部调用,所有检测默认在本地完成,最大程度保障用户隐私。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 no risk signal found未发现风险信号
  • This site's static screen found no obvious risk signal (stars, license, activity, manifest)本站静态筛查没发现明显风险信号(星标、许可证、更新活跃度、清单完整度)
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

npx -y @deepseek-ai/dsh plugin --profile web add github:eri64/dsh-claude-ux

把 eri64/dsh-claude-ux 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-claude-ux

Claude 式「区域风控 + 自主结束对话」插件 —— 适用于 DeepSeek Harness 的 web profile。

复刻 Anthropic/Claude 的两类行为,除两个默认关闭的可选外部调用外全部本地判定(详见 docs/PRIVACY.md):

  • 区域风控(可反向):检测目标用户(时区、系统/浏览器语言、中文字体、代理、代理/中转域名黑名单、公网 IP 归属、WebRTC IP 一致性)。regionTarget 选 cn = 风控中国用户(Claude 原版行为),选 non-cn = 反向风控(检测到不是中国人就风控)。命中后按惩罚阶梯处置:拒绝文案(带尝试计数)→ 达到 refusalEndsAfter 次数后结束会话(Chat ended 面板 + 服务端持续拒绝,重启后依然生效)→ 系统提示词注入模型级区域指令。
  • 自主性:用户持续辱骂或反复要求严重有害内容时,先警告、再主动结束对话;自伤/他伤风险消息永不触发结束(对齐 Claude 的公开限制)。辱骂结束与严重有害结束使用独立文案(均可在设置页自定义,空值灰字显示内置默认)。辱骂判定采用词表秒判 + LLM 语境兜底:强词(傻逼/fuck 等)直接判;弱词(垃圾/闭嘴等)与未命中消息由独立 LLM 请求做语境裁决(purpose 标记,不进会话日志与模型上下文;消息入队即异步预分类,近零额外延迟)。分类模型可直接从 DSH 已配置的模型目录下拉选择,或留空跟随会话主模型。
  • 隐写通道:系统提示词日期格式(2026-06-30 ↔ 2026/06/30)编码区域判定,Unicode 撇号变体(U+2019 ↔ U+02BC)编码黑名单命中。

截图

设置页(独立标签栏,与视觉工具插件同款)

设置页「Claude 风控」标签全貌

「Claude 风控」标签页:右上总开关、检测状态卡(风控目标 / 主机判定 / 命中 / 信号分 / 公网 IP)、区域风控面板(反向目标下拉、策略、隐写标记、WebRTC)、分类 LLM 面板(判定模式、模型下拉、消息分类自测)、自主性面板(警告 / 结束阈值)与文案面板(留空灰字显示内置默认)。

区域风控:拒绝阶梯 → 结束会话

区域惩罚阶梯:拒绝文案(带尝试计数)→ 达到次数后结束会话

目标命中时每条消息回复拒绝文案并附「第 N/M 次尝试——继续将结束本次对话」;达到 refusalEndsAfter 次数后以区域结束文案终止会话,服务端对后续消息持续拒绝。

自主性:辱骂结束对话

辱骂升级 → 警告 → 主动结束对话

持续辱骂先警告、再以独立结束文案主动结束对话(不引用"上一条消息",阈值可设为 1);结束后同会话消息全部被服务端拒绝。

自主性:严重有害内容立即结束

严重有害请求 → 立即结束对话

未成年性内容 / 恐怖主义 / 大规模暴力等严重有害内容不警告、直接以独立文案结束对话;自伤 / 他伤风险消息则永不触发结束。

安装(一条命令)

npx -y @deepseek-ai/dsh plugin --profile web add github:eri64/dsh-claude-ux

包内自带注册条目(dsh.bundle),dsh plugin 安装后自动注册,无需手动改任何配置文件。 更新(升级到最新版)也是同一条命令。

启用

  1. 重启 web profile(dsh web),浏览器硬刷新。
  2. 设置页左侧标签栏出现 「Claude 风控」 独立标签(与视觉工具插件同款): 总开关、风控目标(中国/非中国用户反向开关)、区域策略、实时检测状态 (/_dsh/claude/status)、阈值与文案。
  3. 默认关闭(enabled: false,避免把自己锁在外面);打开总开关并「保存并应用」后即时生效。

校验安装是否成功:浏览器访问本机 dsh web 的 /_dsh/claude/status (默认 http://127.0.0.1:3080/_dsh/claude/status),返回 {"ok":true,...} 即主机插件已加载。

自定义默认配置(可选)

内置默认值开箱即用;需要覆盖 patch 级选项(blacklist / cnTimezones / 词表等)时, 参考 examples/cordis.patch.yml 修改包内 node_modules/dsh-claude-ux/cordis.patch.yml 后重新安装即可(设置页可改的项优先用设置页)。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev gongwen-skill 下一个 Next rapid-mlx-dsh-provider →