dsh-translate

toolstested: passnpmApache-2.0

Tool-output repair layer for DeepSeek Harness — JSON schema enforcement, parameter mapping, and JSON repair for tool calls.

下载量 / Downloads
2,181
依赖体积 / node_modules
7.07 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

Install

dsh plugin --profile web add dsh-translate

Sandbox test results

StageResult
1 install✓
2 list✓
3 mount✓
4 boot—

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

README

<div align="center">

🔁 dsh-translate

  • 1024 store channel: npm i -g dsh1024 once, then dsh1024 plugin --profile web add dsh-translate (counts toward the deepseek1024.com install ranking).

![Gitee](https://gitee.com/perrylink/dsh-translate)

![dshfind](https://dshfind.com/plugins/PerryLink/dsh-translate?ref=badge)

![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/PerryLink/dsh-translate)

Vendor parameter translation and deterministic JSON repair for DeepSeek Harness.

Same request, every vendor. Broken JSON, fixed without inventing data.

This is a vendor parameter mapping table, not machine translation.

Official repository. This is the only official repository of dsh-translate, maintained by PerryLink. Same-name repositories under other accounts are not affiliated.

![License](LICENSE)

![DSH plugin](https://github.com/topics/dsh-plugin)

![dsh-doctor](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)

![DSH Market](https://dsh.market/)

![Node](#)

![CI](https://github.com/PerryLink/dsh-translate/actions)

![Version](https://github.com/PerryLink/dsh-translate/releases)

![npm version](https://www.npmjs.com/package/dsh-translate)

![npm downloads](https://www.npmjs.com/package/dsh-translate)

[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)

dsh plugin --profile <name> add dsh-translate

</div>


📖 Ecosystem knowledge base — measured data, not marketing: plugin development guide · plugin-selection data · maintenance criteria.

<!-- star-cta -->

Install & uninstall

  • git channel (latest main): dsh plugin --profile web add github:PerryLink/dsh-translate — pure JS, no build step.
  • npm channel (published releases): dsh plugin --profile web add dsh-translate.
  • tarball channel: pnpm pack in this repo, then dsh plugin --profile web add ./dsh-translate-<version>.tgz.
  • uninstall: dsh plugin --profile web remove dsh-translate (or remove the row from the profile patch).

⭐ 如果它帮到了你

这个插件是 DSH 插件家族的一员(95 个,全部 Apache-2.0)。如果你在用,给个 star —— 它不会解锁任何功能,但会让下一个人在搜索里更容易找到它。

English: part of a 95 plugin family for DeepSeek Harness. If it is useful, a star helps the next person find it — nothing is gated behind it.

What is dsh-translate?

Vendor parameter translation and deterministic JSON repair for DeepSeek Harness.

Same request, every vendor. Broken JSON, fixed without inventing data.

Workflow overview: install → open panel → act. The examples below use the real command surface.

Compatibility

Surface · Status

Harness · Main version dsh-v0.2.1-alpha.1 (verified 2026-09-25: dual typecheck rulers + node --test 80/80 + self-contained/artifacts gates). npm dev/test pins now 0.1.7-rc.2; peers >=0.1.2-rc.1 <0.2.0 \ · \ · >=0.1.5-alpha.1 <0.2.0 \ · \ · >=0.1.6-0 <0.2.0 \ · \ · >=0.1.7-0 <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 (transformRequest in lib/rosetta.mjs).
  • The repair layer — a tools/post-execute listener plus the fix_json tool. When a successful tool result carries broken JSON as a string (string-rooted or json-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 explicit null placeholders. 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

dsh plugin --profile web add github:PerryLink/dsh-translate
# 1. install the bundle into your profile
dsh plugin --profile web add github:PerryLink/dsh-translate

# 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

…(truncated)

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

Versions

Published on npm::28,最后更新 2026-11-05

Links

GitHub · Homepage · npm

Same category