快速了解
它能做什么
用于跨供应商 LLM 参数转换和确定性 JSON 修复的 DeepSeek Harness 插件。
本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。
Web Profile
DSH 0.1.2-rc.1; peers >=0.1.2-rc.1 <0.2.0; Node ^22.19.0 || >=24.0.0
证据已验证
核对日期 2026/9/6 UTC 13:51
选择前先看
该插件提供 /translate 命令,可在列出的 11 家 LLM 供应商之间映射规范化请求参数;还提供 fix_json 和执行后修复层,用于处理符合条件的成功 JSON 文本工具结果。修复采用有界文本转换和 Schema 校验;无法修复的结果会保持不变。
适合谁
需要在不同 LLM 供应商之间切换,或希望更稳健处理工具返回的格式错误 JSON 的 DeepSeek Harness 用户。
常见任务
- 比较或转换受支持供应商之间的 temperature、top_p、max_tokens、stop、system 等参数。
- 使用 fix_json 按可选 Schema 修复 JSON 文本负载。
- 为符合条件的成功工具结果启用有界自动修复,也可为指定工具选择加入。
权限与数据
清单声明需要读取文件和追加会话事件的权限,不使用网络或原生代码。
权限- fs:read
- session:append
- network:none
- native-code:none
- 可选的 rosettaDataPath 会读取用户配置的映射数据文件。
- 文档称会话审计事件仅包含工具名、策略名、编辑次数和截断标记等元数据,不包含负载内容。
- 修复后的规范值和 fix_json 差异可能对模型可见。
- 声明不使用网络。
- 未声明需要凭据。
局限
- 支持的 JSON Schema 子集有限;不支持的关键字和循环 Schema 会被拒绝。
- 自动修复仅处理符合条件的成功 JSON 文本结果,不会把失败的工具结果改为成功。
- 仅当 Schema 接受 null 时,才会以 null 补全缺失的必填字段。
- 在部分较旧的宿主版本中,会跳过会话审计追加,因此不会保留会话内审计镜像。
DSHub 已核对
- 已提供固定提交来源、包结构、插件补丁、npm 注册表身份和 Apache-2.0 许可证证据。
- 清单声明了 DSH peer 依赖、Node 要求、profile-bundle 集成方式及权限。
DSHub 未核对
- 提供的证据未实际执行安装、重启、运行行为或与当前 Harness profile 的兼容性验证。
- 提供的证据未审计 npm 包内容。
固定版本安装
安装 dsh-translate
这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。
维护者原文
项目 README
🔁 dsh-translate
- 1024 store channel:
npm i -g dsh1024once, thendsh1024 plugin --profile web add dsh-translate(counts toward the deepseek1024.com install ranking).
Vendor parameter translation and deterministic JSON repair for DeepSeek Harness.
Same request, every vendor. Broken JSON, fixed without inventing data.
Official repository. This is the only official repository of dsh-translate, maintained by PerryLink. Same-name repositories under other accounts are not affiliated.
English · 简体中文 · Español · Português · हिन्दी
</div>Compatibility
| Surface | Status |
|---|---|
| Harness | Main version dsh-v0.1.3-alpha.1 (GitHub tag, verified 2026-09-06: full gate chain + profile install smoke). npm dependency line pinned to 0.1.2-rc.1; peers >=0.1.2-rc.1 <0.2.0. |
| Node | ^22.19.0 || >=24.0.0 |
| Form | Pure-host JS plugin (no browser half) |
| Model | Any model — repair is deterministic, no extra model calls |
What you get
Two independent surfaces, one bundle:
/translate— the vendor parameter translation table:temperature,top_p,max_tokens,stop,system, and 8 more canonical parameters mapped across 11 vendors (OpenAI, ERNIE, Qwen, Anthropic, Google, DeepSeek, Mistral, Cohere, xAI, Groq, Azure). Ask for a pairwise mapping, list vendors/params, or convert a whole standard request (transformRequestinlib/rosetta.mjs).- The repair layer — a
tools/post-executelistener plus thefix_jsontool. When a successful tool result carries broken JSON as a string (string-rooted orjson-rooted output schema, or a tool opted in by name), the layer repairs it deterministically: markdown-fence extraction, escape repair, trailing-comma removal, truncation closure, and required-field completion with explicitnullplaceholders. No value is ever invented — a result that still violates the schema fails closed, and failed tool results are never flipped into successes.
tool result (success, JSON text) ──▶ extract fence ──▶ parse
│ ok? ──▶ schema-validate ──▶ accept { kind: 'accept', value } (registry re-validates + re-renders)
│ broken ──▶ escape / trailing-comma / close / fill-null ──▶ validate
│ unrepairable ──▶ next() (original value preserved) + translate/fix audit (counts only)
Quick start
# 1. install the bundle into your profile
dsh plugin --profile web add "github:PerryLink/dsh-translate#main"
# or from npm (published releases)
dsh plugin --profile web add dsh-translate
# 2. restart and verify the row
dsh --profile web --dump-config | grep -A2 'id: dsh-translate'
Then ask the agent to check a mapping or repair a payload:
> /translate openai ernie max_tokens
> Use fix_json to repair: {"a": 1,} against {"type":"object","properties":{"a":{"type":"integer"}},"required":["a"]}
Install & uninstall
- git channel (latest
main):dsh plugin --profile web add "github:PerryLink/dsh-translate#main"— pure JS, no build step. - npm channel (published releases):
dsh plugin --profile web add dsh-translate. - tarball channel:
pnpm packin this repo, thendsh plugin --profile web add ./dsh-translate-<version>.tgz. - uninstall:
dsh plugin --profile web remove dsh-translate(or remove the row from the profile patch).
Configuration
All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch; false registers nothing |
repair.enabled |
true |
Post-execute repair layer switch |
repair.toolNames |
[] |
Extra tool names whose JSON-text results may be repaired (on top of string-rooted / json-rooted schemas) |
repair.strategies.escapeRepair |
true |
Escape raw control characters inside strings |
repair.strategies.trailingComma |
true |
Remove commas directly before a closing bracket |
repair.strategies.truncationClosure |
true |
Close an unclosed string or container cut off by truncation |
repair.strategies.fieldCompletion |
true |
Complete missing required fields with explicit null placeholders |
repair.maxSteps |
8 |
Strategy application budget (repair-loop passes, 1..64) |
diffMaxChars |
200 |
Cap on one logged diff fragment, in characters |
diffMaxEntries |
50 |
Cap on logged diff entries |
registerCommand |
true |
Register the /translate command |
registerTool |
true |
Register the fix_json tool |
rosettaDataPath |
(none) | Optional external rosetta data file (same shape as the bundled lib/rosetta-data.json); overrides the built-in mapping table |
Example override in your profile patch:
- insert:
- id: dsh-translate
name: dsh-translate
config:
enabled: true
repair:
enabled: true
toolNames: ['emit-json']
strategies:
escapeRepair: true
trailingComma: true
truncationClosure: true
fieldCompletion: true
maxSteps: 8
diffMaxChars: 200
diffMaxEntries: 50
registerCommand: true
registerTool: true
Tools & surfaces
| Surface | Kind | Notes |
|---|---|---|
/translate |
command | vendors, params, or <from> <to> [param] pairwise mapping |
fix_json |
tool | { text, schema?, strategies? } → { ok, repaired?, diff?, strategies, truncated, validated, error? }; diff fragments are bounded and sanitized |
| post-execute repair | listener | Automatic for successful string results from string-rooted / json-rooted schemas (plus repair.toolNames); always calls next() unless it claims the call |
Permissions & data
- Permissions: no network, no subprocess, no credentials — the plugin only consumes the official
commandsandtoolsservices and appends to the session log. - Data: repair never fabricates values; the only model-visible additions are the repaired canonical value and the
fix_jsondiff. Session audit events (translate/fix) carry tool name, call id, strategy names, edit counts, and truncation flags — never payloads. The audit write is gated by the host’s session-event vocabulary: hosts that knowtranslate/fixget the plain two-argument append, hosts with theignorableappend envelope get the marked append, and envelope-less hosts (0.1.0-rc.6–0.1.1-rc.2,0.1.2-rc.1) get no audit append — the tool result remains the model-visible log. 0.1.2-rc.1 (adapted 2026-09-04): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.
Security boundaries
- Deterministic only. Repair is bounded text surgery; the upstream LLM-retry arm of JSON-Schema-Enforcer-Proxy was deliberately not ported — a post-execute listener never calls a model.
- Fail closed. Unrepairable syntax and schema violations leave the original result untouched (or return a structured error from
fix_json);nullplaceholders only land when the schema acceptsnull. - Hostile input bounded. Unsupported schema keywords and circular schemas are rejected;
oneOfvalidation is capped by depth (MAX_ONE_OF_DEPTH) and a branch budget (MAX_ONE_OF_BUDGET), so an exponential schema cannot exhaust the process. - No payload leakage. Logs and audit events never contain repaired payloads; diffs are truncated and capped before display or storage.
Known limitations
- The supported JSON Schema subset mirrors the harness tool registry (
type/oneOf/properties/required/additionalProperties/items/enum/const); other keywords are rejected as unsupported, not silently ignored. - Repair only applies to successful results whose canonical value is a JSON-text string; a value that already failed schema validation arrives as a failed result and is never flipped.
- The translation table covers 11 vendors × 13 canonical parameters;
extendedrows follow public API references (not the upstream trio) and are marked as such inlib/rosetta.mjs. - On hosts that neither know
translate/fixnor expose theignorableappend envelope — the published0.1.0-rc.6–0.1.1-rc.2line and0.1.2-rc.1, which fails closed on unknown event types at read — the adaptive gate skips the audit append so the session log is never polluted; the in-log audit mirror is lost on those hosts until the event type is registered.
Development
pnpm install # node ^22.19 || >=24
pnpm test # node --test: 79 tests (pure lib suites + real-service assembly suite)
pnpm run check # tsc checkJs against types.d.ts
pnpm run verify:self-contained # dependency specs resolve from the registry
pnpm run verify:artifacts # ESM face imports under plain Node + lib exports present
node scripts/check-readme-sync.mjs # five-language README sync gate (also in CI)
pnpm pack # the published tarball
Topics
dsh, dsh-plugin, deepseek-harness, deepseek, cordis, json-repair, schema-validation, parameter-mapping, llm-api, tooling
Contributors
- @PerryLink — creator and maintainer: translation table and repair pipeline ports, plugin surfaces, tests, and the five-language docs.
PerryLink DSH Plugin Family
This project is one of the 33 DeepSeek Harness plugins maintained by PerryLink. If this one helps you, the others likely will too:
| Plugin | One-liner |
|---|---|
| dsh-dsh-auto-review | Second-model auto-review on the approval chain, fail-closed by default |
| dsh-dsh-background-agents | Durable background child agents with a Web UI sidebar, messaging and interrupt |
| dsh-dsh-budget | Cost governance for DeepSeek Harness: budgets, carbon, and latency in one panel. |
| dsh-dsh-checkpoint-rewind | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore |
| dsh-dsh-claude-move | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH |
| dsh-dsh-click | Cross-platform native desktop control for DeepSeek Harness — Windows first. |
| dsh-dsh-composer-history | Terminal-style input history for the web composer: arrows, Ctrl+R search |
| dsh-dsh-data-quality | Dataset quality checks and citation cross-checks (the optional numeric bridge consumed here) |
| dsh-dsh-defend | Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness. |
| dsh-dsh-doublecheck | Engineering-discipline guard: requirements grill, test gates, adversary review |
| dsh-dsh-draw | Unified static-image generation routing for DeepSeek Harness. |
| dsh-dsh-fast | Read-only performance diagnostics for DeepSeek Harness. |
| dsh-dsh-fund-research | Deterministic research reports for Chinese public mutual funds |
| dsh-dsh-github | GitHub PR/issues integration for DSH, every write gated by approval |
| dsh-dsh-industry-research | Industry research orchestration that seals its deliverables through this plugin's ctx.researchReport.assemble |
| dsh-dsh-library | Local document knowledge base for DeepSeek Harness. |
| dsh-dsh-local-ai | Local-model (Ollama) integration for DeepSeek Harness. |
| dsh-dsh-lsp-actions | LSP diagnostics, formatting, completion, code actions and rename over language servers |
| dsh-dsh-mask | PII masking middleware: anonymize at the model boundary, restore at the display layer |
| dsh-dsh-mcp-panel | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors |
| dsh-dsh-memento | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
| dsh-dsh-observe | OpenTelemetry and Langfuse observability exporter for DeepSeek Harness. |
| dsh-dsh-output-styles | Claude Code outputStyles-equivalent runtime style switching |
| dsh-dsh-permission-rules | Claude Code-style declarative allow/deny/ask permission rules with audit |
| dsh-dsh-plugin-guide | Plugin-development knowledge base as an on-demand agent skill |
| dsh-dsh-research-report | Verifiable research-report engine: content-addressed evidence ledger and sealed versions |
| dsh-dsh-score | Multi-dimensional quality scoring for DeepSeek Harness plugins. |
| dsh-dsh-session-pin | Pin sessions in the Web sidebar with durable ordering |
| dsh-dsh-session-sync | Cross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store. |
| dsh-dsh-skill-pack-security | Security-audit skill pack: secret scan, dependency and supply-chain review |
| dsh-dsh-talk | Voice-first session loop for DeepSeek Harness: talk to it, hear it answer. |
| dsh-dsh-test-drive | Isolated install-and-smoke test drives for DeepSeek Harness plugins. |
Install from the DSH Desktop Market
All PerryLink plugins are browsable in the built-in DSH Desktop Market: Market → Sources → add source → paste https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json → select it. Installation still goes through the Market's npm-identity verification and your confirmation.
License
Apache License 2.0 © 2026 dsh-translate contributors
有意识地管理
安装与管理
前置条件与目标 Profile
目标: Web Profile
交付方式: Git Bundle — PerryLink/dsh-translate#d11772c414f5c290b24f9ce79511a63ab81a19d6。
验证、更新与移除
显示生命周期命令
dsh plugin --profile web list兼容性与访问范围
Declared DSH profile-bundle compatibility: DSH 0.1.2-rc.1; peers >=0.1.2-rc.1 <0.2.0; Node ^22.19.0 || >=24.0.0。
风险事实
证据与编辑审查Manifest、Bundle patch、分发与新鲜度
不可变证据
审查状态与源码活动
如需使用已固定的受审查来源,请选择该 Git 提交;在依赖自动修复前,建议先在非生产 profile 中评估行为。
AI 审查于 2026/9/10 UTC 11:36。GitHub 事实核对日期: 2026/9/10 UTC 11:36。
自当前证据基线以来,没有记录到重要源码变化。