Apache-2.0 的纯主机端 dsh 插件:`/translate` 背后的 13 × 11 厂商参数表,加上一层有界、失败关闭的 JSON 修复,绝不编造数值,也绝不把失败的工具结果翻成成功。
DSH 适配
原生运行时
作者声明
安全审计
未审计
最后核验
2026-11-10
许可证
Apache-2.0
01它能帮你完成什么?
把规范请求参数映射到各家厂商的真实字段名,让同一份请求跑通每一家
`/translate` 查询(厂商、参数,或两家之间单参数映射),以及经 `lib/rosetta.mjs` 的 `transformRequest` 整包转换请求
把 DeepSeek Harness 接到多家 LLM 厂商、仍在手工翻译 `max_tokens`、`top_p`、`system` 等字段的人
把成功工具结果里的坏 JSON 修到能过 schema 校验,且不编造数值
`tools/post-execute` 修复层与 `fix_json` 工具:提取围栏、解析,再按策略做有界文本修复,最多 `repair.maxSteps` 轮
自建工具输出字符串化 JSON、偶尔出现截断/尾逗号/缺必填字段的 agent 开发者
02如何接入 DeepSeek Harness?
前置条件
- DeepSeek Harness `>=0.2.1 <0.3.0`(README 兼容性表;`engines.dsh` = `>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0`)
- Node.js `^22.19.0 || >=24.9.0`
- 一个 profile 名——README 用 `web`
安装步骤
- 01
从 npm 安装:`dsh plugin --profile web add dsh-param-repair`
$ dsh plugin --profile web add dsh-param-repair
- 02
或从 git 安装:`dsh plugin --profile web add github:PerryLink/dsh-param-repair`
$ dsh plugin --profile web add github:PerryLink/dsh-param-repair
- 03
或从 tarball 安装:先 `pnpm pack`,再 `dsh plugin --profile web add ./dsh-param-repair-<version>.tgz`
$ dsh plugin --profile web add ./dsh-param-repair-<version>.tgz
验证接入成功
- `dsh --profile web --dump-config | grep -A2 'id: dsh-param-repair'` 能看到插件行
- 执行 `/translate openai ernie max_tokens`——README 给出的输出是 `max_tokens: max_tokens → max_output_tokens`
回滚
- `dsh plugin --profile web remove dsh-param-repair`,或从 profile patch 里删掉该行
03DSH 适配与能力边界
原生主机端 dsh 插件(纯 host JS、无浏览器半、无构建步骤):在官方 `commands` / `tools` 服务上注册 `/translate` 命令与 `fix_json` 工具,并挂一个 `tools/post-execute` 监听器承担修复层。bundle patch 只 insert 自己那一行。
`/translate` 参数映射表
`vendors`、`params`,或 `<from> <to> [param]`→13 个规范参数对到 11 家厂商的真实字段名
`fix_json` 工具
`{ text, schema?, strategies? }`→`{ ok, repaired?, diff?, strategies, truncated, validated, error? }`,diff 片段有界且脱敏
post-execute 修复层
成功工具结果中规范值为 JSON 文本字符串(string 根或无约束 `json` 根 schema,外加 `repair.toolNames`)→通过 schema 校验的替换值;修不动就 `next()` 原样放行
失败到达的工具结果永不被翻转为成功`translate/fix` 审计事件只记工具名、call id、策略名、编辑条数与截断标志——绝不记载荷敌意输入有界
调用方给出的任意 JSON Schema 子集→只接受 harness 工具注册表同款关键字子集(`type`/`oneOf`/`properties`/`required`/`additionalProperties`/`items`/`enum`/`const`),其余按不支持拒绝
`oneOf` 校验受深度与分支预算限制,指数级 schema 无法耗尽进程
04适合谁?何时不该用?
适合
- 把 DeepSeek Harness 接到多家 LLM 厂商、仍在手工翻译 `max_tokens`、`top_p`、`system` 等字段的人
- 自建工具输出字符串化 JSON、偶尔出现截断/尾逗号/缺必填字段的 agent 开发者
不适合
- 修复只作用于规范值为 JSON 文本字符串的成功结果;已因 schema 校验失败的结果按失败到达,绝不翻转。
05兼容性、维护与安全提示
- 修复只作用于规范值为 JSON 文本字符串的成功结果;已因 schema 校验失败的结果按失败到达,绝不翻转。
- 本包原名 `dsh-translate`(0.2.x),自 1.0.0 起改名 `dsh-param-repair`;npm 名 `dsh-translate` 现属另一个整页翻译插件。`/translate` 命令、`fix_json` 工具、`translate/fix` 事件与全部配置键都没变,迁移只需把 profile 行里的包名换掉。
- 在既不认识 `translate/fix`、又没有 `ignorable` 信封的宿主上,自适应门会跳过审计写入——会话日志不被污染,但这些版本没有 in-log 审计镜像。
- 翻译表覆盖 11 家厂商 × 13 个规范参数;`extended` 行按公开 API 参考扩展(非上游三家),并在 `lib/rosetta.mjs` 中标注。
Apache-2.0 · 持续维护(最新 release v1.0.2,2026-11-09)· 社区插件,与 DeepSeek 官方无关
06常见问题
修出来的值是编造的吗?
不是。修复只做有界的文本手术:转义修复、去尾逗号、截断闭合、以显式 `null` 占位补全必填字段。`null` 只在 schema 接受 `null` 时落地,否则按 `SCHEMA_VIOLATION` 失败关闭。失败到达的工具结果永远按失败返回;上游的 LLM 重试臂有意未移植。
会和其他插件抢 `tools/post-execute` 吗?
不会。这是 Cordis 的广播事件,每个监听器都会执行,谁也无法饿死别人。本插件只在能交出通过校验的替换值时认领调用,其余路径一律 `next()` 委托,绝不短路链条。
会调用模型、联网或读凭据吗?
都不会。整个插件无网络、无子进程、无凭据,只消费官方 `commands` 与 `tools` 服务。参数映射是纯数据查表,修复是纯函数文本处理。
支持哪些 DeepSeek Harness 版本?
`>=0.2.1 <0.3.0`(`engines.dsh` = `>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0`),已对照 `dsh-v0.2.1-alpha.1` 核验,Node.js 需 `^22.19.0 || >=24.9.0`。
我之前用的是 dsh-translate,需要重新配置吗?
不需要。自 1.0.0 起包名改为 `dsh-param-repair`,但 `/translate` 命令、`fix_json` 工具、`translate/fix` 事件与全部配置键都没变,只需把 profile 行里的包名换掉。
07相关的 DSH 工作流
dsh-our-free-model
作者 ebony-vinyl
在 dsh 里装上这个插件即可,无需登录、注册或填 API Key,就能使用包括 DeepSeek V4.1 Flash、Kimi K3 在内的前沿模型——完全免费,不限量。 All you do is install this plugin in dsh: no login, no sign-up, no API key — the frontier models are just there, DeepSeek V4.1 Flash and Kimi K3 among them. Completely free, with no usage cap.
dsh-routing-suite
作者 yjh051108
DeepSeek Harness(dsh)路由套件:先装运行时注入器,再加载任务感知的推理模式路由预设(已实测 P1-P23)。
dsh-ops
作者 t-auto
A toolkit for low-level operations in DSH, designed to reduce token usage and task execution time / DSH 底层操作工具插件,旨在减少 Token 消耗与任务耗时
brooks-lint
作者 hyhmrright
基于 12 本经典工程书籍的 AI 代码评审工具,提供腐化风险诊断、书籍引用、严重度标签及 6 种分析模式。
08数据与来源
面向 DeepSeek Harness 的纯主机端插件:`/translate` 把 13 个规范参数映射到 11 家厂商,`tools/post-execute` 修复层与 `fix_json` 工具把成功工具结果里的坏 JSON 确定性…
整个插件无网络、无子进程、无凭据,只消费官方 `commands` 与 `tools` 服务
页面基于项目公开文档、仓库元数据和 DSH Plugins 的结构化解析生成;最后核验于 2026-11-10。发现错误?提交更正。
最佳 DeepSeek Harness 插件
从全目录挑出的 12 个值得优先安装的插件,覆盖各个分类。
