dsh-error-gloss: Add a line of Chinese explanation for DeepSeek Harness errors

Introduction

The official DSH client only localizes 6 error codes into Chinese; all other errors are transparently relayed in English. Most errors encountered in daily development are in English, and some cause the session to drop, leaving only an incomplete string. To find the cause of these errors, you have to search the logs yourself, infer the context, or compare with the official error code table.

dsh-error-gloss is a client-side plugin that solves this problem: it does not change the core, nor does it alter the original error text. It only adds a line of Chinese explanation below the official error line and categorizes the causes into three levels: “Certain / Possible / Unverified”. Below is an introduction to its coverage, design principles, installation method, and applicable boundaries.

What is it

  • Name: dsh-error-gloss
  • Maintainer: chenmianmian19977-glitch (GitHub shows author name ‘A Bowl of Big Noodles’)
  • Version: 0.1.0 (package.json and index index.json are both 0.1.0)
  • Repository: https://github.com/chenmianmian19977-glitch/dsh-error-gloss
  • Directory: https://www.skillhub.cn/plugins/chenmianmian19977-glitch/dsh-error-gloss
  • Stars: 0 (GitHub API real-time data, repo created on 2026-11-05)
  • License: Code / Dictionary / Build scripts are MIT; Character images and cover art in the interface are CC BY-NC-SA 4.0

One-sentence positioning: Add a line of Chinese explanation to every error in DeepSeek Harness; 40 entries cover all official error codes.

It only handles client-side tasks: injecting annotations into the projection layer via official public extension points. The English original text, original code tag, and official error lines are all preserved intact, not replaced or obscured. The display effect of annotated errors is as follows, with the official error line remaining intact on top, and the Chinese annotation on a separate line underneath:

本轮运行失败  pi-ai detected context overflow for model "trae-cn/deepseek-v4.1-flash"  [CONTEXT_WINDOW_EXCEEDED]
【上下文窗口超限】本次请求携带的内容超过模型可用上下文,本轮已停止。 · 建议:新建会话,把长材料拆成几段   展开详情

After expanding “Show Details”, there are six sections: Original Text, Explanation, Cause (with confidence), Impact, Suggestions, and Basis. The original text takes priority.

Coverage

There are 40 entries in total, divided into two layers.

  1. Precise entries: 29, one for each code, including specific explanations and suggestions. Covers context overflow, 6 compression failure branches, authentication / quota / rate limiting, keys, images, timeouts, abort, subtask continuation, etc.
  2. Code-family entries: 11, covering TEAM_*, GOAL_*, ASK_*, SESSION_*, ATTACHMENT_*, WEB_*, SANDBOX_*, ACTIVATION_*, as well as model adapters, authorization flows, and tool calls.

No official codes are missing on this side. The only ones that still display “Reason Unverified” are free-text written by the server itself (e.g., details of INVALID_REQUEST). This kind of text has no code and cannot be enumerated. The plugin’s approach is to preserve the original text and only add Chinese explanation, not guessing the cause.

Three Design Principles

Route by code, do not parse the text. The official HarnessError comments state it bluntly: route on this, never by parsing message. Adapter wording changes anytime, codes are relatively stable. The matching order is: Exact Code → Code Family → Text Template → Fallback.

Categorize causes into three levels; if uncertain, say so. The combination of the three levels is as follows.

Level Interface Appearance Used for
Certain Cause: Because … (with evidence) Direct meaning of the code, e.g., “Compression Cancelled”
Possible Possible Cause: … (need to judge based on token usage) Needs context to determine, e.g., context overflow
Unverified Cause Unverified — This text is from the server Free text, Code Family (only know which module it belongs to)

Code-family entries are always forbidden. It only answers “Which functional module does this belong to, and is it related to the model / network?”, leaving the specific cause for you to check in the original text. Better to say “I don’t know” than to give a fake attribution.

No exception is allowed to affect the host. If the client plugin’s apply() throws an error, the entire DSH will fail to start. Every step of plugin registration is wrapped in exception handling separately. Registration failure only logs and shows a red border in the settings page; it never bubbles up.

Installation

This package is not published to npm; the current way is to install from GitHub. The repository already includes the built client/bundle.js. No compilation is needed during installation, no npm install is required, and there are no runtime dependencies.

Install from GitHub using the plugin manager:

dsh plugin --profile desktop add https://github.com/chenmianmian19977-glitch/dsh-error-gloss

You can also provide the tarball address directly to skip git clone, which is faster:

dsh plugin --profile desktop add https://github.com/chenmianmian19977-glitch/dsh-error-gloss/archive/refs/heads/main.tar.gz

Uninstall:

dsh plugin --profile desktop remove dsh-error-gloss

If you don’t use the plugin manager, use the manual installation scripts:

git clone https://github.com/chenmianmian19977-glitch/dsh-error-gloss
cd dsh-error-gloss
node tools/install-local.mjs      # Copy to profile + append bundles + load pre-check
node tools/uninstall-local.mjs    # One-click rollback

Both scripts are idempotent; if installed incorrectly, they can be cleaned up completely.

The third way is to install via the “Discover” page. DSH’s plugin market is not a centralized store, but a set of index sources: each source is a JSON with format: 1, the Host is responsible for scraping and validation, and the “Discover” page is responsible for display. The repository comes with its own index, and the validator @deepseek-ai/dsh-plugin-market-index has been verified. The steps are: Plugins → Discover → Add Index Source, paste the following address:

https://raw.githubusercontent.com/chenmianmian19977-glitch/dsh-error-gloss/main/index.json

When “Error Chinese Annotation” appears in the list, click install. If the “Discover” tab doesn’t exist, the path is: Plugins page → Experimental Plugins → More → Enable “Custom Plugin Market”. The index source is added by you, what you install is up to you, and the phrase on the interface “Index provided by third party” is true.

Confirmation After Installation

The settings page path is Settings → Error Chinese Annotation. Here you can see the version, number of loaded entries, hit count, and a “Self-test” button: click it to render a complete annotation using built-in samples, zero requests, zero model calls, used to confirm installation.

The hit count is suitable for verifying whether the entries truly cover the codes you encounter, rather than just being installed.

Modifying Entries Yourself

The dictionary is pure data, placed in catalog/entries/*.json, one entry per file. After modification, rebuild according to the following three steps:

node tools/build-client.mjs      # Bundle
node src/selftest.mjs            # Engine self-check
node client/bundle-test.mjs      # Client load

User-level overrides are placed in ~/.dsh/error-gloss.user.json, performing field-level merging based on id. Among them, causeAssertion is one-way locked: you can downgrade “Certain” to “Possible”, but not vice versa. This design effectively forces a “cannot silently write uncertain as certain” loophole.

Privacy and Compatibility

Regarding privacy, the declaration is zero telemetry, zero model calls, zero network egress: all annotations come from the local dictionary, no extra request will be sent just to translate the error; the plugin does not initiate any network requests; annotations only enter the projection layer, not the transcript. Content entering the logs will be desensitized first, covering keys, Bearer, UUID, request_id, absolute paths, and phone numbers.

Regarding compatibility, the plugin is tested against DeepSeek Harness 0.2.1-rc.2. It only uses official public extension points: dsh.client manifest, ctx.locale.register, ctx.slots.inject / ctx.slots.register, zero kernel changes, zero forks. Dictionary entries each have dshVersionRange; entries across versions will be marked stale and skipped, never applying old text to new errors.

Applicable Scenarios and Notes

Suitable for two types of people. One is developers who use the DSH client to run agents daily and want error messages to be immediately readable. The other is people maintaining DSH plugins or doing secondary development who want to unify the team’s error explanation standards. The dictionary is pure JSON, making modification low cost.

Points to note:

  1. This is a client-side plugin; annotations rely on the host client’s projection layer. If you are using a non-client scenario (pure Host / CLI), annotations may not be rendered.
  2. The plugin runs with the permissions of the current DSH process. Before installing, go through the source code, confirm that the registration logic and desensitization rules meet your expectations, and then decide whether to install.
  3. The license is split into two layers: code, dictionary, and build scripts are MIT; the “Big Fat Fish” character image and cover art in the interface (client/assets/, client/icon.png, assets/) are CC BY-NC-SA 4.0, and the author declares that this image cannot be commercialized in any form. If used in a commercial scenario, delete these two resources and run node tools/build-client.mjs again. The plugin will fall back to the original whale tail badge (pure SVG), and the code part remains MIT. See PROVENANCE.md for the full scope and Takedown process.
  4. The project is unrelated to DeepSeek officially, it does not include or modify any official code, see NOTICE.md for details. The community directory page is an independent site listing, not the official app store.

Summary

The value of dsh-error-gloss lies not in rewriting errors, but in adding Chinese explanations and executable suggestions while preserving the original text, and handling the “uncertainty” with three levels of causes. For people mainly developing DSH plugins on the client side, it is a local error dictionary that you can follow as a template.

Directory: https://www.skillhub.cn/plugins/chenmianmian19977-glitch/dsh-error-gloss

GitHub: https://github.com/chenmianmian19977-glitch/dsh-error-gloss

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye