Introduction¶
The design philosophy of DeepSeek Harness (DSH) is “Everything is a plugin.” When developing intelligent agents or workflows, models often encounter tedious, repetitive tasks: retrieving values by path, comparing differences between two text snippets, converting time zones, calculating quantiles for a column of numbers, and so on. Mental arithmetic is error-prone, while ad hoc scripts are slow and not generalizable.
The dsh-toolbox plugin was created to solve this type of problem. It provides a set of locally executed pure-function tools, with ten available after installation, allowing developers to replace handwritten scripts and let the model call deterministic tools directly.
What It Is¶
dsh-toolbox is a toolbox plugin for DSH, maintained by qlheric. It includes ten core tools: json, calculator, encoding, diff, time, csv, regex, stat, markdown, and schema.
All of these tools compute locally. They do not use the network, do not read or write files, and do not execute code. They have zero runtime dependencies and zero build steps, and are pure ESM modules. This means the same input always produces the same output, making them well suited for assertions and automated workflows.
Core Features¶
The plugin has ten built-in tools, covering data parsing, encoding, calculation, statistics, and validation.
- json: path-based value access (
$,.a.b,['key'],[index], supporting negative numbers and the[*]wildcard), retrieving keys, retrieving the type, validation, and formatting. - calculator: expression evaluation.
- encoding: conversion among base64, base64url, url, and hex, as well as md5 through SHA-512 hashes and UUID generation.
- diff: generate unified diffs, JSON path-level differences, and CSV row-by-row differences.
- time: get current time, convert time zones, add or subtract time, and calculate time differences.
- csv: parse RFC 4180-format CSV, query by column, compute numeric column statistics, and convert to a GFM table.
- regex: regular expression testing, finding, replacement, and explanation.
- stat: descriptive statistics, quantiles, frequency counts, and Pearson/Spearman correlation coefficients.
- markdown: generate headings, table of contents, canonical tables, remove markup, and count words.
- schema: JSON Schema subset validation, with support for local
$ref.
Installation and Activation¶
Use the official command to install it. Do not use npm install (the package has not yet been published to npm).
dsh plugin --profile <你的 profile> add github:qlheric/dsh-toolbox
After installation, restart DSH for the changes to take effect.
Typical Usage¶
json¶
Retrieve data from nested structures. Multiple syntaxes are supported:
* $: root object
* .a.b: dot-path syntax
* ['key']: key-based access
* [index]: array index (negative numbers are supported)
* [*]: wildcard
calculator¶
Evaluate expressions and compute results safely.
encoding¶
Perform common encoding and hash conversions, including conversion among base64, base64url, url, and hex, as well as md5, sha256, sha512, sha1, sha384, and UUID generation.
diff¶
Compare differences among text, JSON, or CSV data, with support for unified diff output.
time¶
Handle time-related operations, including now, convert, add, and diff.
csv¶
Process CSV data, including RFC 4180 parsing, querying by column, numeric column statistics, and conversion to a GFM table.
regex¶
Provide regular expression testing, finding, replacement, and explanation.
stat¶
Perform statistical analysis on numeric data, including descriptive statistics, quantiles, frequency counts, and Pearson and Spearman correlation coefficient calculations.
markdown¶
Assist with Markdown document processing, including generating headings, table of contents, canonical tables, removing markup, and word counting.
schema¶
Validate whether JSON data conforms to a JSON Schema subset, with support for references to local files.
Notes and Use Cases¶
Runtime Environment and Dependencies¶
- No network access, no workspace changes, no code execution: all calculations are completed in local memory, with no external network access and no modifications to the local file system.
- Electron desktop compatibility: the Electron desktop
desktopprofile does not support the installation command above (the CLI will refuse to take over). In that environment, manually modify thedsh.profile.bundlesconfiguration inpackage.json, and then install using a package manager. - npm note: the package is not yet published to npm, so do not attempt
npm install.
Security and Stability¶
- calculator safety mechanism: it does not use
eval; identifiers must match whitelisted functions and constants. - regex safety mechanism: it performs a check before running. If a high-risk quantifier (such as a nested quantifier) is detected and the input exceeds 4KB, execution is rejected outright to prevent catastrophic backtracking.
- schema validation: unknown keywords trigger
schemaIssues; they are not silently ignored. - error messaging: when a failure occurs, it provides human-readable messages. For example, if a key cannot be retrieved, it explicitly states “no such key” instead of dumping a stack trace.
- time zone handling: the time zone for the
timetool affects presentation only; internal calculations are always performed in UTC.
Applicable Scenarios¶
It is suitable for developers who need to combine a model with deterministic tools. If you are building a DeepSeek Harness workflow that requires data cleaning, format conversion, statistical analysis, or text comparison, this is an ideal toolbox.
Conclusion¶
dsh-toolbox provides a standardized toolkit aimed at reducing model hallucinations and the effort of manual scripting. Through these locally executed pure-function tools, workflow reliability and reusability can be significantly improved.