dsh-plugin-translation
开发工具 活跃维护

dsh-plugin-translation

863683348/dsh-plugin-translation

集成句子切分、术语与术语表提取、源译校验、语气适配等核心翻译能力,提供会话级持久化翻译记忆,无需重复配置即可为AI代理输出风格统一、术语准确的多语种翻译结果。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
21 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:863683348/dsh-plugin-translation
git clone https://github.com/863683348/dsh-plugin-translation.git
git clone git@github.com:863683348/dsh-plugin-translation.git
README.md main

dsh-plugin-translation

A translation toolkit for DeepSeek Harness agents: chunking, glossary extraction, source–target QA, tone guides, and a durable translation memory. The model translates; the plugin chunks, checks, and remembers.

Install

dsh plugin --profile <profile> add dsh-plugin-translation

Restart DSH. The translate_kit tool is registered host-wide.

Tool

action purpose
segment Split text into numbered, bounded chunks for chunked translation
glossary Extract candidate terms (acronyms, camelCase, domains, numbers+units, emails, URLs) with counts
check Source–target QA: numbers/units, brackets, length ratio, doubled punctuation
tone Register-specific tone guide (formal / colloquial / technical, en / zh)
memo_get Read the translation memory (newest first)
memo_add Save a source→target pair to the memory file in the session workspace
glossary_get Read the durable glossary (newest first)
glossary_add Add or update a source→target glossary term in the workspace glossary file
glossary_remove Remove a glossary term by source
consistency Cross-segment terminology consistency check against the glossary

Config

All optional, on the composition row's config:

key default meaning
personaSection true register the translation prompt-guidance section
sectionOrder 6 prompt section order (persona is 0, ascending)
memoFile .dsh/translation-memo.md memory file path (relative to the session workspace; cannot escape it)
glossaryFile .dsh/translation-glossary.md glossary file path (relative to the session workspace; cannot escape it)
maxGlossaryEntries 200 entries kept in the glossary file
maxMemoEntries 200 entries kept in the memory file

Design

Pure logic (lib/translation.js) has zero DSH/Cordis imports and is unit-tested in isolation; lib/index.js is the thin Cordis plugin. Memory access goes through ctx.fs and every resolved path is containment-checked against the session workspace.

License

MIT

Roadmap

See ROADMAP.md — next five versions (v0.2.0 – v0.6.0): glossary management & consistency, tone memory & quality scoring, side-by-side diff & placeholder protection, conflict detection & effort stats, glossary versioning & batch pipeline.