DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

xmjerryyy /

xmjerryyy/dsh-ghh-workbuddy

Verified

DeepSeek Harness plugin: a local loopback relay that lets a WorkBuddy API key drive WorkBuddy models from DSH. Scrubs the client fingerprint and prompt fragments the gateway rejects (400/11128).

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@772538ac

dsh-ghh-workbuddy

把 WorkBuddy(腾讯 CodeBuddy 系)网关接进 DeepSeek Harness,用一个 API Key 就能在 DSH 的模型选择器里直接调用 WorkBuddy 的 17 个内置模型。

为什么需要它

WorkBuddy 网关会拒绝「看起来像第三方 agent 框架」的请求,一律返回 400 / code 11128(msg 会随版本变化:Illegal API invocation from an unapproved channel → request illegal)。实测踩到过四道独立的闸门,任意一道都能拦下请求:

# 闸门 表现
1 系统提示首句 You are an AI agent powered by DeepSeek Harness. 400 / 11128
2 DeepSeek Harness 与多处 GUI 同时出现在系统提示里(dsh-web-app 注入的 Web GUI 说明段) 400 / 11128
3 系统提示里的 @ 记号(与其它信号叠加后触发) 400 / 11128
4 请求头 user-agent: deepseek-harness/…(2026-11-06 起直接判死) 400 / request illegal

这个插件在本机起一个回环端点,只重写这四道闸门读到的地方,其余请求体逐字节 原样转发。

它做什么

  1. 在 127.0.0.1:<port> 起一个 OpenAI 兼容端点(默认 8899),随 DSH 进程启停
  2. 转发前清洗:删身份句、DeepSeek Harness Web GUI → web GUI、系统提示里的 @ → at
  3. 把 user-agent 换成中立客户端(默认 CodeBuddy/1.0)
  4. 通过自带的 cordis.patch.yml 声明一个 workbuddy-api provider 指向自己

为什么配置放在插件自己身上:DSH 会根据设置界面回写 profile 的 cordis.patch.yml,手写进去的 provider 会在下次改设置时被整段清掉。作为 bundle 加载则不受影响。

安装

# 1. 把本文件夹挂进 profile 的 node_modules
$target = "D:\01\dshwin\.dsh-home\profiles\desktop\node_modules\dsh-ghh-workbuddy"
New-Item -ItemType Junction -Path $target -Target "D:\01\ds\插件\dsh-ghh-workbuddy"

# 2. 把它列入 profile 的 bundles(package.json → dsh.profile.bundles)
#    加上一行 "dsh-ghh-workbuddy"
  1. 放入 API Key(凭据层,不写进配置):
# $DSH_HOME/.credentials.yaml
refs:
  WORKBUDDY_API_KEY: ck_...
  1. 重启 DSH,模型选择器出现 WorkBuddy API 分组。

配置项

cordis.patch.yml 里插件的 config:

键 默认值 说明
port 8899 回环监听端口,需与 provider 的 baseURL 一致
upstream https://copilot.tencent.com 上游网关地址
forwardUserAgent CodeBuddy/1.0 转发时使用的 User-Agent
timeoutMs 600000 上游空闲超时

自检

Invoke-WebRequest http://127.0.0.1:8899/healthz -UseBasicParsing   # 插件是否在跑

预期返回 {"ok":true,"upstream":"https://copilot.tencent.com","port":8899}。

若 healthz 不通,说明插件没被加载——检查 profile 的 dsh.profile.bundles 是否包含本包,以及 package.json 里的 dsh.bundle.patch 是否存在。

排错顺序

网关的规则会变,遇到 400 时按这个顺序排查:

  1. 看 msg:request illegal → 多半是 UA 闸门;Illegal API invocation… → 内容闸门
  2. 直连 vs 经中继:直连 400 而经中继 200,说明清洗生效
  3. 缩小 payload:最小请求(短 system + hi)也 400 → 检查 UA;大请求才 400 → 检查内容
  4. 逐个关闸:临时把 forwardUserAgent 改成别值、或把 system 提示截短,看哪一条有效

已知限制

  • 上游限流时返回 429 / code 6004(带恢复时间),与本插件无关
  • 上游的检测规则不公开且会变,本插件按「实测到的四道闸门」清洗;若上游新增闸门, 需要在 index.js 的 scrubText / scrubSystemText / 转发头里补对应规则
—/ 5

No ratings yet

Verified DSH bundle

Commit 772538aca762

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout