Preface¶
When running agents or workflows in DSH, the model often only sees the conversation context and struggles to systematically answer “is it healthy right now”. Common workarounds are ad-hoc cat of some state file, or having the model piece together JSON itself, but being unable to read something and reading it yet misjudging it are two different things: the former should be explicitly marked as “cannot determine”, while the latter requires reproducible judgment rules.
The following introduces dsh-health-readout published by maintainer laa1991 in the GitHub repository laa1991/dsh-health (community directory category: workflow). It is a read-only DSH plugin: you declare in configuration “where to read from, what counts as healthy, and what conclusion corresponds to an anomaly”; the plugin combines existing readings (local files, JSON fields, log tails, HTTP JSON, etc.) and returns a single overall verdict along with the details of each reading. It does not write, does not persist state, and does not act as a new source of truth.
What Is This¶
dsh-health-readout (npm package name dsh-health-readout, current version 0.1.0, MIT license) targets DeepSeek Harness users: it consolidates scattered health signals into the result of a single tool call for the model or orchestration logic to use. The plugin exposes a tool health_readout via a Cordis patch, with no browser side and no settings UI; conclusions enter the session as the tool’s return value.
Three Built-in Rules¶
The README emphasizes that the following three are enforced by types and tests, not by convention:
- “Cannot know” must never be treated as normal. A source that cannot be read yields
unknown, which will not becomeok,0, orfalse;unknownis displayed separately and affects the overall verdict. - Every judgment must be falsifiable. When
selftest: true, counterexamples are fed to each declared criterion; if a criterion stays green, it is reported as a non-falsifiable “decorative item”. - Every reading must write a blind spot.
blindis mandatory, explaining what that reading cannot see, to avoid misinterpreting it as full coverage.
Core Capabilities¶
Declarative Spec¶
Define the readings array in readings.json under the data directory (by default you can copy the repo’s examples/readings.example.json and modify it). Each reading contains id, title, source, healthy, and the mandatory blind.
Example structure (consistent with the README):
{
"readings": [{
"id": "queue-depth",
"title": "Queue depth is under the ceiling",
"source": { "kind": "json-field", "path": "status.json", "field": "queueDepth" },
"healthy": { "op": "lt", "value": 8, "bad": "degraded" },
"blind": "A single sample: a queue that drains and refills between samples looks identical to a quiet one."
}]
}
Source Kinds¶
| kind | Meaning | Required fields |
|---|---|---|
file-age-seconds |
Seconds since the file was last written | path |
file-size |
Byte count | path |
file-exists |
Whether the path exists (false means known not to exist) |
path |
json-field |
Dotted-path field inside a JSON file | path, field |
jsonl-last-field |
Dotted field of the last parseable line of a JSONL (tail read) | path, field, optional maxBytes |
text-count |
Count of regex matches within maxBytes at the tail of a file |
path, pattern, optional maxBytes, flags |
dir-count |
Number of files in a directory, filterable by suffix | path, optional suffix |
http-json-field |
Dotted field inside an HTTP JSON endpoint (with timeout) | url, field, optional timeoutMs |
Relative paths in the spec are resolved relative to dataDir; ~ and ${dataDir} expansion are supported.
Judgment Operators and States¶
healthy.op supports: lt, lte, gt, gte, eq, neq, between, matches, exists, absent.
When the healthy condition is not met, healthy.bad specifies the state of that reading (default degraded). The severity ordering is: ok < notice < unknown < degraded < broken; the worst reading determines the overall verdict. unknown is deliberately ranked above notice to avoid giving a confident ok while there are unseen parts.
Tool health_readout¶
Read-only invocation, with optional parameters:
only: comma-separated reading ids, only evaluating a subset.selftest: when true, additionally verifies whether each criterion can turn red.
The output lists each reading’s value, verdict, reason, and blind spot; items that could not be read are listed separately (README quote: "Could not read" is not "fine".).
Installation and Configuration¶
Installation¶
Configuration resolution order: plugin inline config: → environment variables → built-in defaults.
Official installation methods (README Install section):
dsh plugin --profile <name> add dsh-health-readout # npm
dsh plugin --profile <name> add ./dsh-health-readout-0.1.0.tgz
dsh plugin --profile <name> add <git-url> # prebuilt: no build step, no postinstall
The package contains runnable files as-is, with no build, no prepare, and no runtime dependencies; installing from a git URL does not require granting the user build permissions. The runtime requirement is Node.js >= 18.0.0.
Configuration Items¶
| Meaning | config key | Environment variable | Default |
|---|---|---|---|
| Directory containing readings | dataDir |
DSH_HEALTH_READOUT_DATA_DIR |
~/.dsh-health-readout |
| Declaration file | specFile |
DSH_HEALTH_READOUT_SPEC |
readings.json under dataDir |
| Only evaluate certain ids | only |
DSH_HEALTH_READOUT_ONLY |
All |
Note: dataDir is deliberately not the DSH platform directory. A DSH upgrade may rebuild its own directory; the readings you declare should be placed on a path you fully control, to avoid being wiped out by an upgrade.
Typical Usage¶
- Choose a
dataDir(by default~/.dsh-health-readout, or specify via config /DSH_HEALTH_READOUT_DATA_DIR). - Copy the repo’s
examples/readings.example.jsonto<dataDir>/readings.json, and editreadingsaccording to your monitored targets. - Install the plugin in your profile and fill in the above config (if needed).
- Call the tool
health_readoutin a DSH session; passselftest: truewhen you need to spot-check criteria; passonlywhen you temporarily want to look at only a few.
Test command provided by the maintainer (no additional test framework):
node --test test/criteria.test.mjs test/sources.test.mjs test/spec.test.mjs test/readout.test.mjs
The README states that the suite reports its own test count (46 at the time of writing); if it disagrees with the number in the documentation, the suite output is authoritative.
Use Cases and Limitations¶
Suitable for: You already have state files, JSON snapshots, log tails, or read-only HTTP metrics, and want the agent to get a unified “ok / notice / unknown / degraded / broken” conclusion in a single tool call, without writing extra queries or writing to a database inside the plugin.
Not suitable for, or things to note:
- No cross-line aggregation: for example, if you need “how many entries are still unclosed in the JSONL” by folding multiple lines, that should be done upstream where the snapshot is produced; the spec only reads existing aggregated values.
- No history: each reading is a single current sample; trends require an external recorder (which writes, beyond the scope of read-only).
- No
changed-within-style operator: comparing with history requires state. unknownraises the verdict: a missing file affects the overall conclusion by design.- Trust model: the spec can read any path accessible to the dsh process; whoever writes the spec is responsible for the paths.
- Permissions: the plugin runs with the permissions of the current dsh process; review the source code and MIT license yourself before installing.
The community directory laa1991/dsh-health on skillhub.cn has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin”, and the directory is a discovery entry point on an independent site.
Closing¶
dsh-health-readout writes “where to read, what counts as healthy, and what a failure counts as” into a JSON declaration, and outputs a single auditable overall verdict through the read-only tool health_readout. If your workflow already produces file- or interface-based metrics and you want the model to stop guessing, you can install it per the README and maintain readings.json in a directory you manage.
- Directory page: https://www.skillhub.cn/plugins/laa1991/dsh-health
- GitHub: https://github.com/laa1991/dsh-health