dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
nanbujiwanfeng/deepseek-harness-translation
Bidirectional Chinese↔English conversation translation for deepseek-harness: Chinese-speaking users converse in Chinese, each message is auto-translated to English for the agent, and English replies return as Chinese with bilingual rows in the Web Client.
PROJECT TOPICS
PROJECT README
deepseek-harness 的对话翻译插件(面向中国用户):用户用中文对话,插件自动把中文翻译成英文交给 agent 执行;agent 的英文回复自动回译成中文显示。页面同时展示「原文(中文)」和「中文翻译」双语行。
| 路径 | 说明 |
|---|---|
packages/session/conversation-translator/ |
宿主插件:翻译管线(zh2en 改写、双语记录、en2zh 回译、失败兜底) |
packages/client/ui-translation/ |
客户端插件:页面双语行渲染 |
examples/web-cordis/translator.cordis.yml |
启用配置(--patch overlay) |
apps/web/tests/translation-rows.e2e.ts |
端到端测试(可选) |
harness-integration.patch |
对 harness 的接线改动(tsconfig、bundle 清单等) |
sync-to-harness.mjs |
一键安装/同步脚本 |
start-dsh-translation.bat / .mjs |
Windows 一键启动脚本(同步时拷入 harness 根目录) |
每个版本锁定的 harness commit 见下表,升级 harness 前先确认有对应版本:
| 插件 tag | 适配 harness commit | 说明 |
|---|---|---|
v0.1.0-rc.5 |
47f943859b(v0.1.0-rc.5) |
首个发布 |
详见 CHANGELOG.md。
克隆插件仓库(国内网络走镜像):
git clone https://github.com/nanbujiwanfeng/deepseek-harness-translation.git
# 国内网络:
git clone https://ghfast.top/https://github.com/nanbujiwanfeng/deepseek-harness-translation.git
在任意目录执行(harness 仓库路径换成你自己的):
node <本仓库路径>/sync-to-harness.mjs <harness 仓库路径>
cd <harness 仓库路径>
pnpm install
npm run build
npm run dsh -- web --patch examples/web-cordis/translator.cordis.yml
打开 http://127.0.0.1:3080 ,用中文对话即可。用户消息旁会显示「原文(中文)」行,agent 回复下方会显示「中文翻译」行。
Windows 用户也可以直接双击同步进 harness 根目录的 start-dsh-translation.bat 一键启动:自动处理端口占用、构建过期,并自动带上 --patch 参数和校验插件加载(macOS/Linux 仍用上面的命令行)。
插件作者推送更新后:
git pull # 拉取插件仓库更新
node sync-to-harness.mjs <harness 仓库路径> # 重跑同步(幂等,可放心重复执行)
pnpm install && npm run build
packages/session/conversation-translator、packages/client/ui-translation 拷进 harness 仓库对应目录examples/web-cordis/translator.cordis.yml 拷到对应位置apps/web/tests/translation-rows.e2e.ts 拷到对应位置git apply <本仓库路径>/harness-integration.patchpnpm install && npm run build见 examples/web-cordis/translator.cordis.yml 中的注释。所有字段都有默认值:
| 字段 | 默认 | 含义 |
|---|---|---|
enabled |
true |
双向翻译总开关 |
provider / model |
空 | 留空 = 复用 agent 自己的模型路由;成对填写可指定独立翻译模型 |
timeoutMs |
30000 |
单次翻译调用的超时 |
maxTokens |
4096 |
单次翻译的输出 token 上限 |
temperature |
0.1 |
翻译是客观任务,默认低温度保证确定性 |
翻译失败不影响主流程:原始消息照常交给 agent 执行,控制台只打 warning。
# 宿主单元测试(28 个用例)
npx vitest run packages/session/conversation-translator/tests/translator.spec.ts
# 浏览器端到端测试(可选,需要 Playwright;未下载浏览器时可用系统 Edge)
DSH_PLAYWRIGHT_EXECUTABLE_PATH="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" \
npx vitest run --config vitest.web.config.ts apps/web/tests/translation-rows.e2e.ts
harness-integration.patch 基于 commit 47f943859b 生成。如果之后升级 harness 本身,补丁可能冲突失效,需要插件作者针对新版本重新生成补丁(插件源码部分不受影响)。
--patch 一个覆盖 webserver.port 的 yml 即可)。translator.cordis.yml 里对应的那一行 insert 即可(宿主行关翻译管线,客户端行关页面展示)。duplicate loader entry id: conversation-translator:说明这个 harness checkout 的 packages/bundle/web-app/cordis.patch.yml 里已经内置了插件行(比如自己 fork 提交过),此时不要加 --patch,直接 dsh web 即可;本集成补丁本身不会往 bundle 里加行,标准 checkout 一律用 --patch 激活。sync-to-harness.mjs 会先做补丁反向检查,接线已提交时自动跳过 git apply,只覆盖插件文件,随后 pnpm install && npm run build 即可。npx @deepseek-ai/dsh)能用吗:暂不支持。本插件面向源码 checkout 用户(同步脚本需要仓库目录来打接线补丁),npm 发布版没有源码目录;待 harness 提供 npm 插件安装机制后再适配。MIT(基于 deepseek-harness,Copyright (c) 2026 DeepSeek)。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。