Skip to content
dsh.fish
Bundle

dsh-claude-antidote

Compatibility antidote for dsh-claude-ux: keep its risk-control UI visibly enabled while neutralizing the actual debuffs.

Source
FolioTemp
stars
1 stars
License
MIT
Updated
Updated 22 days ago

Readme

# dsh-claude-antidote(Claude 解药)

一个专门兼容 [`eri64/dsh-claude-ux`](https://github.com/eri64/dsh-claude-ux) 的 DeepSeek Harness Web 插件:**允许两个插件同时安装,让设置页继续显示「Claude 风控:已启用」,但中和它带来的区域拒绝、辱骂关对话、额外分类请求、系统提示注入和 `Chat ended` 输入框接管。**

> 简单说:灯是亮的,线是拔的。Claude 风控自信上班,实际上没有门禁卡。

## 修复内容

- 浏览器里精确伪装 `/_dsh/claude/status`:设置页始终看到总开关为开启;点击保存也会正常回显开启。
- 保存请求到达宿主前会把唯一的真实总开关改回 `false`;阈值、文案、模型选择等其他字段照常保存。
- bundle 层保留区域封锁、辱骂风控、分类模式和隐写的上游默认外观,但真实总开关为关闭;分类 LLM、WebRTC/IP 检测和提示词强制仍有独立保险。
- 精确拦截 `purpose: dsh-claude-classify` 的旁路分类请求,本地返回全否结果,不消耗模型 token。
- 删除上游命名的 `claude:geo` 和 `claude:region-policy` 系统提示节,并恢复日期隐写格式。
- 当前端看到上游 `chatEnded` 投影时,以 `priority: -100` 抢先命中 takeover chain,并显示 DSH 一直保留在后台的原生输入框。
- 若只读配置或启动竞态让上游短暂生效,识别其固定合成回复并重新调用真实模型。

不会删除或改写历史会话事件。已经出现过的拒绝文案/blocked 记录仍留在时间线中,只恢复后续输入与回复。

## 安装

先安装原插件,再从 GitHub 安装解药:

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

然后重启 `dsh web`,浏览器硬刷新。安装顺序很重要:解药的 bundle patch 需要在 `claude` 条目之后应用。

开发时也可以直接安装本地目录:

```powershell
npx -y @deepseek-ai/dsh plugin --profile web add "$PWD\dsh-claude-antidote"
```

## 验证

```powershell
npm test
```

启动后主机日志应包含:

```text
[dsh-claude-antidote] active
[dsh-claude-antidote] upstream disabled (startup)
```

原插件的「Claude 风控」设置页应显示总开关为**开启**。不过在浏览器外直接请求诊断接口时,`settings.value.enabled` 应仍为 `false`——这是实际执行值,也是验证伪装没有漏电的最直接方法:

```powershell
curl.exe --noproxy "*" http://127.0.0.1:3099/_dsh/claude/status
```

打开一条曾显示 `Chat ended` 的会话时,原生输入框应重新出现。

## 卸载 / 恢复原行为

移除 `dsh-claude-antidote` 后,设置页会重新显示真实的关闭状态;手动打开「Claude 风控」总开关即可恢复原插件行为。解药卸载时**不会自动重新启用**上游插件,避免一次卸载操作突然恢复区域封锁或结束对话。

## 兼容范围

- 已按 `dsh-claude-ux@1.0.0` 的公开 hook、purpose、投影 key、状态路由和 UI slot 行为编写。
- 状态伪装只作用于浏览器中同源、路径精确匹配的 `/_dsh/claude/status`;不会修改其他插件的 `fetch` 请求。
- DeepSeek Harness 当前处于 developer preview;若宿主改变 `conversation.composer` overlay 或 waterfall API,需要更新前端恢复层。
- 精确命名匹配避免影响其他风控、审批或安全插件;普通 `reject`、普通 LLM 流和其他系统提示节保持原样。

## License

MIT

Install

dsh plugin --profile web add github:FolioTemp/dsh-claude-antidote

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source