Back to directory

dsh-param-repair

In a curated listMaintenance: Active

perrylink/dsh-param-repair

Vendor parameter mapping and deterministic JSON repair for DeepSeek Harness: map temperature/top_p/max_tokens/stop/system across 11 vendors and repair broken JSON tool output with auditable rules.

View on GitHubHomepage
$ dsh plugin --profile web add dsh-param-repair

15

stars

0

forks

JavaScript

Language

Apache-2.0

License

2026-08-16

Created

2026-11-13

Last push

Apache-2.0 pure host-side dsh plugin: a 13 × 11 vendor parameter table behind `/translate`, plus a bounded, fail-closed JSON repair layer that never invents values and never flips a failed tool result to success.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-10

License

Apache-2.0

01What can it help you accomplish?

  • Map canonical request parameters onto each vendor’s real field names so one request shape runs on every provider

    `/translate` lookups (vendors, params, or a two-vendor single-parameter mapping) and whole-request conversion through `transformRequest` in `lib/rosetta.mjs`

    People wiring DeepSeek Harness to multiple LLM vendors who keep translating `max_tokens`, `top_p`, `system` and friends by hand

  • Repair broken JSON inside successful tool results until it passes schema validation, without inventing values

    A `tools/post-execute` repair layer and a `fix_json` tool: fence extraction, parse, then bounded text strategies up to `repair.maxSteps` rounds

    Agent builders whose tools emit stringified JSON that occasionally arrives truncated, with trailing commas or missing required fields

02How to install into DeepSeek Harness

Prerequisites

  • DeepSeek Harness `>=0.2.1 <0.3.0` (README compatibility table; `engines.dsh` = `>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0`)
  • Node.js `^22.19.0 || >=24.9.0`
  • A profile name — the README uses `web`

Installation steps

  1. 01

    Install from npm: `dsh plugin --profile web add dsh-param-repair`

    $ dsh plugin --profile web add dsh-param-repair

  2. 02

    Or from git: `dsh plugin --profile web add github:PerryLink/dsh-param-repair`

    $ dsh plugin --profile web add github:PerryLink/dsh-param-repair

  3. 03

    Or from a tarball: `pnpm pack`, then `dsh plugin --profile web add ./dsh-param-repair-<version>.tgz`

    $ dsh plugin --profile web add ./dsh-param-repair-<version>.tgz

Verify the integration

  • `dsh --profile web --dump-config | grep -A2 'id: dsh-param-repair'` shows the plugin row
  • Run `/translate openai ernie max_tokens` — the README shows `max_tokens: max_tokens → max_output_tokens`

Rollback

  • `dsh plugin --profile web remove dsh-param-repair`, or delete the row from the profile patch

03DSH integration and capability boundaries

DSH integrationNative runtime

Native host-side dsh plugin (pure host JS, no browser half, no build step): it registers the `/translate` command and the `fix_json` tool on the official `commands` / `tools` services, plus a `tools/post-execute` listener for the repair layer. The bundle patch only inserts its own row.

  • `/translate` parameter map

    `vendors`, `params`, or `<from> <to> [param]`→13 canonical parameters mapped onto the real field names of 11 vendors

  • `fix_json` tool

    `{ text, schema?, strategies? }`→`{ ok, repaired?, diff?, strategies, truncated, validated, error? }` with a bounded, redacted diff

  • Post-execute repair layer

    a successful tool result whose canonical value is a JSON text string (string-root or unconstrained `json` schema, plus `repair.toolNames`)→a schema-validated replacement value, or `next()` so the original result passes through untouched

    a failed tool result is never flipped to successthe `translate/fix` audit event records only tool name, call id, strategy names, edit counts and the truncation flag — never the payload
  • Bounded hostile-input handling

    an arbitrary JSON Schema subset from the caller→only the harness tool-registry keyword subset (`type`/`oneOf`/`properties`/`required`/`additionalProperties`/`items`/`enum`/`const`) is accepted; others are rejected as unsupported

    `oneOf` validation is capped by depth and branch budget so exponential schemas cannot exhaust the process

04Who is it for? When not to use it?

Good for

  • People wiring DeepSeek Harness to multiple LLM vendors who keep translating `max_tokens`, `top_p`, `system` and friends by hand
  • Agent builders whose tools emit stringified JSON that occasionally arrives truncated, with trailing commas or missing required fields

Not for

  • Repair only applies to successful results whose canonical value is a JSON text string; results that already failed schema validation arrive as failures and are never flipped.

05Compatibility, maintenance and safety notes

  • Repair only applies to successful results whose canonical value is a JSON text string; results that already failed schema validation arrive as failures and are never flipped.
  • The package was renamed from `dsh-translate` (0.2.x) to `dsh-param-repair` at 1.0.0, and the npm name `dsh-translate` now belongs to a different page-translation plugin. The `/translate` command, `fix_json` tool, `translate/fix` event and all config keys are unchanged — migration is just the package name in the profile row.
  • On hosts that neither know the `translate/fix` event nor carry an `ignorable` append envelope, the adaptive gate skips the audit write — session logs stay clean, but there is no in-log audit mirror on those versions.
  • The translation table covers 11 vendors × 13 canonical parameters; `extended` rows follow public API references for vendors beyond the upstream three and are marked as such in `lib/rosetta.mjs`.
2026-08-162026-11-08v1.0.2

Apache-2.0 · actively maintained (latest release v1.0.2, 2026-11-09) · community plugin, not affiliated with DeepSeek

06Frequently asked questions

Are the repaired values invented?

No. Repair only performs bounded text surgery — escape repair, trailing-comma removal, truncation closure, and explicit `null` placeholders for missing required fields. A `null` lands only when the schema accepts `null`; otherwise it fails closed as `SCHEMA_VIOLATION`. Failed tool results always return as failures, and the upstream LLM retry arm is deliberately not ported.

Will it fight other plugins over `tools/post-execute`?

No. It is a Cordis broadcast event, so every listener runs and none can starve another. This plugin claims a call only when it can hand back a validated replacement; every other path delegates with `next()` and never short-circuits the chain.

Does it call a model, use the network or read credentials?

No. The whole plugin has no network, no subprocess and no credentials — it only consumes the official `commands` and `tools` services. Parameter mapping is a pure data lookup and repair is pure text processing.

Which DeepSeek Harness versions are supported?

`>=0.2.1 <0.3.0` (`engines.dsh` = `>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0`), verified against `dsh-v0.2.1-alpha.1`, on Node.js `^22.19.0 || >=24.9.0`.

I used dsh-translate — do I have to reconfigure?

No. Since 1.0.0 the package is named `dsh-param-repair`, but the `/translate` command, the `fix_json` tool, the `translate/fix` event and every config key are unchanged. Only the package name in the profile row changes.

08Data and sources

  • Author-claimedgithub.come14cce2d9943…

    面向 DeepSeek Harness 的纯主机端插件:`/translate` 把 13 个规范参数映射到 11 家厂商,`tools/post-execute` 修复层与 `fix_json` 工具把成功工具结果里的坏 JSON 确定性…

  • Author-claimedgithub.come14cce2d9943…

    整个插件无网络、无子进程、无凭据,只消费官方 `commands` 与 `tools` 服务

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-10. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.