DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-death-forensics

s

dsh-death-forensics

Manifest valid

In-process death black box for DeepSeek Harness (dsh) hosts: heartbeat windows, crash stacks, end-kind self-check, death_forensics_report tool.

hasBundlePatch

dsh-death-forensics

In-process death black box for a DeepSeek Harness (dsh) host. A Cordis plugin (bundle format) that records what happened before the host died — heartbeat windows, crash stacks, and an end-kind self-check at the next boot.

Why

dsh web processes can die without a trace (external kills, frozen event loops, crashes). An external launcher can record how the process died (exit code / stderr / uptime), but only something inside the process can record what happened before: when the last heartbeat was, what the crash stack was, and whether the previous boot ended gracefully.

This plugin is the in-process half. Pair it with an external launcher (see DESIGN.md) for a complete picture.

Features

FeatureMechanism
Heartbeatappend JSONL to <DSH_HOME>/death-forensics/heartbeat.log every heartbeatIntervalMs (default 15s, bounded file)
End-kind self-checkSIGTERM/SIGINT record graceful; exit event records neutral exit; crash/kill leaves running → next boot detects a non-graceful end and appends a record to crash.log
Crash stacksuncaughtException (incl. unhandled rejections via Node's default throw chain) records the full stack, then reprints it and exits(1) — host behavior is byte-identical to the no-plugin case
Report tooldeath_forensics_report — current boot, previous end kind, death window (last heartbeat → next boot), crash log tail, external launcher log tail (if present)

Data files (<DSH_HOME>/death-forensics/)

  • state.json — current boot identity + last end kind (single source of truth)
  • heartbeat.log — append-only JSONL, truncated at maxHeartbeatLines
  • crash.log — append-only JSONL records (crashes + detected non-graceful ends)

Safety contract

  • Zero child processes — never spawns anything; only file writes.
  • Hot paths are synchronous writes with try/catch degrade — failures disable the black box, never the host.
  • Hooks are additive listeners only, cleaned up on plugin dispose.
  • No monkey-patching of host services.

Install

Add to a dsh profile (e.g. profile/profiles/web/package.json):

"dependencies": {
  "dsh-death-forensics": "link:/path/to/dsh-death-forensics"
},
"dsh": {
  "profile": {
    "bundles": [ ..., "dsh-death-forensics" ]
  }
}

Then restart dsh. The bundle patch inserts entry id death-forensics.

Alternatively, via CLI: dsh plugin --profile web add /path/to/dsh-death-forensics.

Build

Requires a dsh checkout or profile install carrying @deepseek-ai/* packages (resolved via $DSH_CHECKOUT, or $HOME/dsh-harness, $HOME/dsh, $HOME/.dsh/dsh-harness), plus typescript:

# install devDependency offline (from any pnpm store)
node <pnpm.mjs> install --store-dir=<pnpm-store-dir> --prefer-offline \
  --config.node-linker=hoisted --config.auto-install-peers=false
# compile src/ → lib/
bash scripts/build.sh        # Git Bash on Windows; node must be on PATH
node lib/selftest.js         # 17 pure-logic assertions

The published lib/ is committed so the plugin works from a plain clone.

Configuration

KeyDefaultDescription
heartbeatIntervalMs15000heartbeat interval (min 5000)
maxHeartbeatLines20000heartbeat file line cap
reportTailLines40tails shown by the report tool
dataDir<DSH_HOME>/death-forensicsdata directory override

Docs

  • DESIGN.md — full design (Chinese): state machine, hook semantics, acceptance criteria.
  • Death-window interpretation: [last heartbeat of previous boot, this boot's start].

License

MIT — see LICENSE.

Comments

Loading…

Similar plugins

dsh-prompt-file-injector

by pgnqukezrdxmhjso

把指定的文件注入 DeepSeek Harness(dsh)的模型上下文。Injects files you choose into the model context of DeepSeek Harness (dsh).

Manifest valid

★ 0

MIT

TypeScript

Sep 27, 2026

dsh plugin --profile web add dsh-prompt-file-injector

by MkaliezZ

DeepSeek Harness health and safety diagnostics: /doctor inspects the effective model-visible tool surface.

Manifest valid

★ 0

↓ 103/wk

MIT

TypeScript

Aug 29, 2026

dsh plugin --profile web add @mkaliezz/dsh-agent-doctor

by ZhijiangTang

DSH plugin: scan Markdown docs for dead links (HEAD with GET fallback, bounded concurrency)

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Aug 16, 2026

dsh plugin --profile web add dsh-dead-links

by everclear077

Progressive tool discovery for DeepSeek Harness — tiny stable surface, searchable catalog, real pipeline execution, context cache intact.

Tools & CapabilitiesManifest valid

★ 7

↓ 31/wk

MIT

TypeScript

Sep 29, 2026

dsh plugin --profile web add dsh-progressive-tools

by CuteSamurai24

Small file memory for DeepSeek Harness. The model writes markdown, the host injects it.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Aug 18, 2026

dsh plugin --profile web add dsh-md-memory

by Qingzhou-Joshua

DeepSeek Harness plugin—a simple toolkit for developers.

Manifest valid

★ 0

MIT

TypeScript

Aug 14, 2026

dsh plugin --profile web add dsh-dev-toolbox