DeepSeek Harness Environment Tool Plugin dsh-envkit

Introduction

In DeepSeek Harness (DSH) development, environment issues often lead to operation failures. Instead of guessing, it is better to investigate the environment first. dsh-envkit is an environment tool plugin designed to solve common problems such as network issues, proxy configurations, writability constraints, and loss of Git metadata.

Plugin Information

  • Name: dsh-envkit
  • Owner: Caoran1314
  • Category: Workflow
  • License: MIT

Core Features

env_probe

Investigates the environment status in one go, including:
- Network endpoints (npm / GitHub API / raw / codeload / jsDelivr / PyPI)
- Proxy environment variables
- Writability of temp directory / home directory / current directory
- Subprocess pipe spawn capability
- Platform / Node version

The probe is read-only (using GET requests + writing temporary files which are immediately deleted) and returns targeted suggestions.

safe__edit

Designed for safe rewriting of JSON files, primarily solving parsing errors caused by UTF-8 BOM.
- Tolerates BOM when reading
- Ensures BOM-free, atomic replacement when writing back
- Keeps a backup by default
- Supports dot-path operations
- Supports the inspectOnly option (check only, do not modify file)

git_repair

Detects and rebuilds lost .git metadata.
- Identifies the metadata-lost-objects-intact state (objects/refs are complete but HEAD/config/index are missing)
- Provides reconstruction steps
- Defaults to dryRun: true, listing commands without executing them
- Only executes init / fetch / reset; does not delete anything

Installation and Activation

The installation command is as follows:

dsh plugin --profile desktop add dsh-envkit

Restart DSH after installation. An “Environment Tools” panel will appear in the settings page, visually displaying probe results and checking BOM and bundle status. If no UI is available, the following commands can be used:
- env-probe
- env-json-check <file>
- env-git-check [dir]

Typical Usage

safe__edit Example

{
  "file": "C:\\Users\\you\\.dsh\\profiles\\desktop\\package.json",
  "set": { "dsh.profile.bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-edict"] },
  "del": ["dependencies.something-old"]
}

git_repair Reconstruction Steps

git init
git branch -M main
git remote add origin <remote>
git fetch origin
git reset --mixed origin/main

Notes

  • env_probe performs read-only probing only.
  • safe__edit modifies files; please confirm before installation.
  • git_repair performs no destructive operations by default.

Ecosystem Background

The DSH philosophy is “Everything is a plugin.” This plugin is a community contribution. You can view it in the Community Directory or check the source code and details on GitHub.

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

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

Xiaoye