dsh-plugin-translation

toolsinstall failsnpmMIT

Translation toolkit for DSH agents: sentence segmentation, term and glossary extraction, source-target QA (numbers, units, brackets), tone guides, and a durable workspace translation memory.

下载量 / Downloads
901
测试时间 / Tested
2026-11-07
DSH 版本 / Version
0.2.2-rc.1

Install

dsh plugin --profile web add dsh-plugin-translation

Sandbox test results

StageResult
1 install✗
2 list—
3 mount—
4 boot—
First error
dsh: initialized profile web at /home/node/.dsh/profiles/web

Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).

README

dsh-plugin-translation

面向 DeepSeek Harness agent 的翻译工具包:分块、术语提取、译文质检、语气指南与持久化翻译记忆。模型负责翻译,插件负责切分、校验与记忆。

安装

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

重启 DSH 后,translate_kit 工具全局注册。

工具

动作 · 用途

segment · 把长文本切成编号分块,便于分块翻译

glossary · 提取候选术语(缩写、驼峰词、域名、数字+单位、邮箱、URL)及出现次数

check · 译文质检:数字/单位、括号配对、长度比例、重复标点

tone · 语气指南(正式 / 口语 / 技术,中 / 英)

memo_get · 读取翻译记忆(新的在前)

memo_add · 保存源→译对到工作区翻译记忆文件

glossary_get · 读取持久化术语库(新→旧)

glossary_add · 新增/更新术语(源→译)到工作区术语表

glossary_remove · 按源术语删除术语条目

consistency · 跨段术语一致性检查(同源术语译文统一性)

配置

均为可选项,写在组合行的 config 里:

键 · 默认值 · 含义

personaSection · true · 是否注册翻译提示词段

sectionOrder · 6 · 提示词段顺序(persona 为 0,升序)

memoFile · .dsh/translation-memo.md · 记忆文件路径(相对会话工作区,运行时校验不可逃逸)

maxMemoEntries · 200 · 记忆文件保留的条目数

设计

纯逻辑(lib/translation.js)零 DSH/Cordis 依赖、可独立单测;lib/index.js 是薄 Cordis 壳。记忆读写走 ctx.fs,所有路径经 containment 校验锁定在会话工作区内。

License

MIT

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::5,最后更新 2026-09-11

Links

GitHub · Homepage · npm

Same category