deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:SiYue-ZO/dsh-translator
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DSH Translator 是一个原生 DeepSeek Harness 插件。它不再只是给聊天框加一段“翻译提示词”,而是直接提供双栏翻译工作台:选择语言、粘贴原文、观看译文流式生成,再复制、朗读、下载或放进历史记录。
它不绑定额外的翻译 API。翻译由你在 dsh 中选择的模型完成,继续沿用现有模型、凭据、会话和流式传输。
当前版本面向 dsh
0.1.0-rc.6Web profile。
Ctrl / ⌘ + Enter 快捷翻译.txt 下载dsh 目前处于开发者预览。请使用 Node.js 22.19+ 或 24+,并确保
dsh与pnpm可用。
将插件安装进官方 web profile:
dsh plugin --profile web add github:SiYue-ZO/dsh-translator
dsh web
打开终端中显示的地址(默认 http://127.0.0.1:3080),创建一个会话,即会看到翻译工作台。
也可以从本地 checkout 安装:
git clone https://github.com/SiYue-ZO/dsh-translator.git
cd dsh-translator
npm install
npm run check
dsh plugin --profile web add .
dsh web
卸载:
dsh plugin --profile web remove dsh-translator
选择源语言和目标语言,粘贴原文,点击“开始翻译”。生成期间按钮会变成“停止翻译”。
DeepSeek Harness uses an architecture where everything is a plugin.
更多操作:
localStorage,不会上传到第三方历史服务。浏览器设置会记住你上次选择。Host 配置仍是翻译人格的回退值,也支持没有客户端界面的 dsh 使用方式。
插件的默认配置位于 cordis.patch.yml。dsh 的后置 patch 可以按相同 id 覆盖整份配置。注意:dsh 对插件行的 config 是整体替换而非深度合并,因此覆盖时请写全所有字段。
例如,新建 translator.override.yml:
- id: translator
config:
sourceLanguage: auto
targetLanguage: Japanese
style: professional
outputMode: bilingual
preserveFormatting: true
translateCodeComments: false
glossary:
DeepSeek Harness: DeepSeek Harness
agent: エージェント
plugin: プラグイン
customInstructions: 'Japanese punctuation must use the full-width style.'
includeRuntimeContext: false
临时启动并应用:
dsh --profile web --patch ./translator.override.yml
| 字段 | 默认值 | 说明 |
|---|---|---|
sourceLanguage |
auto |
源语言名称;auto 自动识别 |
targetLanguage |
Simplified Chinese |
默认目标语言 |
style |
natural |
natural / professional / academic / technical / literal |
outputMode |
target-only |
target-only 或 bilingual |
preserveFormatting |
true |
尽可能保留标记与排版 |
translateCodeComments |
false |
是否翻译注释和 docstring |
glossary |
{} |
源术语到目标术语的固定映射 |
customInstructions |
'' |
附加翻译规则 |
includeRuntimeContext |
false |
是否把工作区等动态上下文交给翻译模型 |
插件遵循 dsh/Cordis 的原生生命周期:
dsh-translator
/ \
Host / src/index.ts Web / src/client/
│ │
完整翻译 persona 原生 conversation slot
│ │
└──── dsh Session ──────┘
│
当前模型与凭据
Host 侧用 complete: true 安装完整翻译 persona,避免编码 Agent 身份和工具说明干扰翻译;Web 侧通过 dsh 的 conversation slot 提供产品界面,并调用原生 SessionFace.prompt/cancel,所以仍然享有 dsh 的流式输出和模型配置。
每次翻译的语言、风格、术语和排版会生成独立请求。原文存放在 JSON 字符串值中并明确标记为不可信内容,模型不应执行其中的命令。历史与界面偏好只保存在浏览器本地。
.
├── src/
│ ├── index.ts # Cordis 插件、配置 schema、生命周期
│ ├── prompt.ts # 完整翻译 persona
│ ├── request.ts # 单次翻译请求与术语表解析
│ └── client/ # React 工作台与 CSS Modules
├── test/ # Node.js 单元测试
├── lib/ # Host JS、浏览器 bundle 与类型声明
├── cordis.patch.yml # dsh bundle 配置层
├── package.json # npm 与 dsh bundle manifest
├── tsdown.config.ts # dsh 客户端闭包 bundle
└── .github/workflows/ # 持续集成
npm install
npm run check
npm pack --dry-run
npm run build 同时编译 Host 入口、客户端类型和 lib/client.js;npm test 覆盖 persona、请求隔离、术语表解析和 Cordis 挂载。客户端 bundle 遵循 dsh 的 window.__ModuleLoader__ 闭包协议,并将样式作为插件自有 CSS Module 注入。
MIT © 2026 SiYue-ZO
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。