Introduction

In the development process of DeepSeek Harness (DSH), comparing data differences between two API responses is a common requirement. If a text editor is used directly for diffing, changes in deep structures can easily be overlooked. This plugin uses a deep comparison algorithm to directly output the key paths of differences, helping developers quickly locate data changes.

Plugin Introduction

This plugin is named dsh--diff and is maintained by developer uckkk. It is a pure Node.js tool whose core function is JSON semantic comparison, returning the key paths of items added, removed, or changed.

Core Functionality

The tool registered by the plugin is diff_. When calling this tool, pass two JSON objects and it will perform a deep comparison and return the difference paths.

Installation and Enablement

The installation command is as follows. After installation, configure dsh.profile.bundles in the package.json of the profile to enable the plugin.

dsh plugin add dsh--diff

Add the configuration entry in package.json:

"dsh.profile.bundles": ["dsh--diff"]

Typical Usage

To compare changes in API responses, call diff_ directly. The parameter a is the old data, and b is the new data.

diff_(a=<旧>, b=<新>)

Notes

The plugin runs code locally with the permissions of the current DSH process and involves execution of third-party code. Be sure to review the source before installation.

Conclusion

This plugin is open-sourced under the MIT License. For more details, see GitHub or the plugin directory.