Introduction¶
During the development and debugging of DeepSeek Harness (DSH), it is sometimes necessary to quickly verify the identity information of the current host process (such as PID, working directory, and Node version) or the distribution of environment variables. Manual inspection or relying on AI prompts is often not direct enough. dsh-env-inspector-plus aims to solve this pain point by adding a read-only page to the DSH web version and providing the model with a read-only tool, making environment health checks intuitive and controllable.
Plugin Positioning¶
This is an admin-security plugin maintained by felixpu. It adds a tab to the DSH web version under “Settings → Environment Health Check” and also injects the env_inspect tool for the model. Its core value is providing a snapshot of the current host process identity and grouped environment variables, while strictly preventing sensitive information (such as credential values) from leaving the host.
Core Features¶
The plugin provides two core interaction modes: web UI viewing and model-side invocation.
Web UI Display¶
After installation, a new read-only tab will appear under “Settings → Environment Health Check” in the DSH web version. This page displays the following information:
- Host process identity: including process ID (pid), entry script path, current working directory (cwd), Node version, platform, and runtime duration.
- Grouped environment variables: displays the total number of environment variables, plus statistics grouped by the
DSH_prefix and by credential pattern (KEY/PASSWORD/SECRET/TOKEN). - Itemized variable list: lists all environment variables, containing only key names and metadata. Each row includes: key name, whether it starts with
DSH_, whether it matches a credential pattern, whether it has a value, and value length. The variable values themselves are not included.
Model Tool Invocation¶
The plugin provides the model with the env_inspect tool. Invoking this tool requires no parameters, and the model will receive the snapshot data described above. This helps the model make judgments based on accurate facts when answering questions about the current runtime environment.
Security Boundary¶
This is the core of the plugin’s design. The values of variables matching credential patterns (KEY/PASSWORD/SECRET/TOKEN) never leave the host.
In the returned variable list, these sensitive variables only return a boolean value (whether they match a credential pattern) and their length. The specific value of any environment variable does not appear in the HTTP response body or in the model context, except for four specific host identity fields:
* host.cwd
* host.profileDir
* host.profile
* host.entry
These four fields retain their original values because they are key information for determining “which directory is currently in use and which profile is being used.” These values themselves would typically appear in the session context anyway.
Installation and Activation¶
Installing the plugin requires the official DSH command-line tool.
- Run the following command in the terminal to install the plugin:
dsh plugin --profile web add github:felixpu/dsh-env-inspector-plus
- After installation, the DSH host process must be restarted for the plugin features to take effect.
Typical Usage¶
Web UI:
Log in to the DSH web version, navigate to “Settings → Environment Health Check”, and view the current environment snapshot.
Model-side:
Directly ask the model to use the env_inspect tool in the conversation. For example, ask: “Please check the current environment variables and tell me the Node version and runtime duration.” The model will invoke the tool and return structured data containing metadata.
Technical Implementation Details¶
- Dependencies and architecture: The plugin does not depend on any
@deepseek-ai/*package, and the tool is defined as a hand-written object (zero DSH dependencies). The client only imports modules from the platform seed table (e.g.,reactand UI primitives). - Routing and injection: The plugin injects the services
['tools', 'webServer']and registers the read-only routeGET /dsh-env-inspector/snapshot. On success, it returns{ ok: true, data: <snapshot> }; on failure, it returns{ ok: false, code: 'snapshot-failed' }. - Failure handling: The host only returns machine-readable codes, while all user-facing sentences are translated by client-side dictionaries. This ensures that when the UI language is switched, error messages update immediately.
- Bilingual support: Supports Chinese and English. Runtime UI strings are registered through dictionaries in
client/client.js, while plugin display metadata is provided throughlocale/*.json. The locale namespace uses the package namedsh-env-inspector-plusto avoid name collisions.
Use Cases and Notes¶
This plugin is suitable for developers who need to quickly troubleshoot environment configuration, validate profile paths, or analyze the distribution of environment variables.
Note: The plugin runs with the permissions of the current DSH process. Before use, it is recommended to review its GitHub repository source code and license (MIT) to ensure compliance with your usage policies.
Short Conclusion¶
dsh-env-inspector-plus provides a secure and controllable way to inspect the DeepSeek Harness host environment. By combining a web UI tab with a model tool, it lowers the barrier to environment debugging while strictly preventing sensitive information from leaking.
For more details, refer to:
* Community Directory
* GitHub Repository