Turns declared health readings — source, criterion, verdict — into one read-only verdict; an unreadable source is reported as `unknown`, never as healthy.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:laa1991/dsh-health
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Declare where to read, what counts as healthy, and what each failure means — get one verdict.
A read-only dsh plugin. It composes readings that already exist (files, JSON endpoints, log tails) and returns a single verdict with per-reading detail. It never writes anything, never keeps state, and never becomes a source of truth.
{
"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."
}]
}
Three rules, built into the API
These are not style preferences. Each one is a bug we shipped somewhere before it became a rule, and here they are enforced by the type shapes and by tests rather than by good intentions:
- "Cannot tell" is never zero. A source that cannot be read yields
unknown— neverok, never0, neverfalse.unknownis always printed, and it moves the verdict on its own. - Every criterion must be able to fire.
selftest: truefeeds each declared criterion its own counter-example and reports any criterion that stayed green — a criterion nobody can falsify is decoration, and it is reported as such. - Every reading states its blind spot.
blindis required. A reading whose limits are unstated reads like a reading whose limits do not exist.
Install
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 ships exactly the files that run (no build, no prepare script, no runtime
dependencies), so a git install needs no build permission from the user.
Configure
Every value resolves in this order: the plugin row's config: block → environment variable →
built-in default.
| setting | config key | environment variable | default |
|---|---|---|---|
| where readings live | dataDir |
DSH_HEALTH_READOUT_DATA_DIR |
~/.dsh-health-readout |
| the declarations | specFile |
DSH_HEALTH_READOUT_SPEC |
readings.json (inside dataDir) |
| evaluate only some ids | only |
DSH_HEALTH_READOUT_ONLY |
all |
The data directory is deliberately not a dsh platform directory. dsh may rebuild its own directories on upgrade; a user's readings must not be inside something that can be rebuilt out from under them. Point
dataDiranywhere you control.
Relative paths inside the spec resolve against dataDir. ~ and ${dataDir} are expanded.
The spec
Copy examples/readings.example.json to <dataDir>/readings.json and edit it.
Source kinds
| kind | reads | required fields |
|---|---|---|
file-age-seconds |
seconds since a file was written | path |
file-size |
bytes | path |
file-exists |
whether a path exists (false is knowledge, not ignorance) |
path |
json-field |
a dotted path inside a JSON file | path, field |
jsonl-last-field |
a dotted path in the last parseable JSONL line (tail-read) | path, field, maxBytes? |
text-count |
regex matches in the last maxBytes of a file |
path, pattern, maxBytes?, flags? |
dir-count |
files in a directory, optionally by suffix | path, suffix? |
http-json-field |
a dotted path in a JSON endpoint (always timed out) | url, field, timeoutMs? |
Operators (healthy.op): lt lte gt gte eq neq between matches exists absent.
States (healthy.bad, default degraded), ordered by severity —
the worst reading decides the verdict:
ok < notice < unknown < degraded < broken
unknown sits above notice on purpose: a readout that cannot see part of the world must not
report a confident ok.
The tool
health_readout — one read-only call, two optional arguments:
only— comma-separated reading ids to evaluate.selftest— also prove every declared criterion can go red.
The rendered output lists each reading with its value, its verdict, its reason and its blind spot,
and prints the unreadable ones separately ("Could not read" is not "fine".).
Tests
node --test test/criteria.test.mjs test/sources.test.mjs test/spec.test.mjs test/readout.test.mjs
The suite prints its own count — 46 when this line was written, so if the two disagree, this line is
the stale one. No test framework, no fixtures on disk. The arms worth knowing about: deleting a
watched file must move the verdict to unknown (never leaving it at ok); a deliberately
unfalsifiable criterion (matches: ".*") must be reported as such by selftest; and the default
data dir and the one in the shipped cordis.patch.yml must each stay out of ~/.dsh — each
goes red when its own file is pointed there, which is how it was checked, not asserted.
Limitations (stated, not hidden)
- No cross-line folding. A reading is one value from one place. "How many records are still open" means folding several JSONL lines into a state, which is a query, not a reading. Point the spec at a file that already carries that number (a derived snapshot) and keep the fold in whatever produced it — this plugin composes readings, it does not become a query engine.
- No history. Every reading is one sample of the present. Trends need a recorder, and a recorder is a writer — out of scope for a readout.
- No
changed-withinoperator. Comparing to a previous value requires state; see above. unknownis noisy by design. A missing file moves the verdict. That is the intended trade: silence about a blind spot is more expensive than a loud report about one.- A spec may read any file the dsh process can read. That is the trust model: the user writes the spec, the user owns the paths.
- Host-only. No browser half, no settings UI; the verdict reaches the model as a tool result.
License
MIT.
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38236
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37190
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
superdesigndev/treg★ 9111
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6016
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
helloHub1212/dsh-windows-mcp★ 2563
Bridges the CursorTouch/Windows-MCP desktop automation server into DSH through the official MCP client bridge, registering its screenshot, UI tree snapshot, mouse and keyboard input, clipboard, process and registry tools as mcp__windows__* tools for the model, and adds a windows_mcp_doctor diagnostic tool. Computer Use is off by default and is switched on from the plugin panel.
sixtysevenlf/dsh-blender-plugin★ 2280
Lets a DSH agent drive a local Blender over a direct TCP channel with 15 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 228 ops across 34 families.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.