DeepSeek Harness plugin

dsh-failure-capsule

Local-first failure evidence capsules for DeepSeek Harness sessions

Jump to install

Source facts

Repository
YiHarvest/dsh-failure-capsule
Latest update
Aug 18, 2026
Category
Memory
GitHub stars
4
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/YiHarvest/dsh-failure-capsule
Plugin: dsh-failure-capsule
Author: YiHarvest

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.en.mdSource · read only
README language

dsh-failure-capsule

A local-first DeepSeek Harness plugin that turns a failed tool call or agent turn into a redacted evidence ZIP: the bounded execution timeline, Git state, runtime metadata, and active plugin inventory in one place.

简体中文

![npm](https://www.npmjs.com/package/dsh-failure-capsule) ![CI](https://github.com/YiHarvest/dsh-failure-capsule/actions/workflows/ci.yml) ![License](LICENSE)

> Status: standard Profile Bundle verified against @deepseek-ai/dsh@0.1.0-rc.7. It uses native session/event and agent/error extension points, never patches Harness core, never uploads data, and never calls a model for diagnosis.

Quick start

Web and headless are separate profiles, so install the plugin in each profile that should capture failures:

dsh plugin --profile web add dsh-failure-capsule
dsh plugin --profile headless add dsh-failure-capsule

dsh --profile web --dump-config
# Expect id: failure-capsule / name: dsh-failure-capsule

Capsules appear under the session workspace by default:

.dsh/failure-capsules/
└── 2026-08-14T08-20-31-123Z_<session>_tool-error_event-42.zip

What gets captured

The default triggers are failed tool/result events, error / blocked / interrupted turn endings, and live agent/error signals that have no durable failed-turn record. User cancellation is excluded unless triggerOnAborted is enabled.

When a live agent error carries a minified JavaScript stack, the plugin resolves it back to original source using the project's local source maps, so the capsule records readable frames instead of one minified line.

Each ZIP contains:

FileEvidence
manifest.jsonSchema version, trigger, file index, and redaction counts
failure.jsonStructured failure identity
timeline.jsonlUp to 80 session events ending at the failure
diagnosis.mdDeterministic, model-free triage entry points
runtime.jsonNode, OS, architecture, and project package metadata
plugins.jsonLoader entries, enabled state, and fiber phase
redaction-report.jsonSafe per-rule replacement counts
stack-trace.jsonParsed stack frames and source-map resolution (when a stack is present)
stack-trace.mdDe-minified, readable frames with source context
session/header.jsonSession cwd, lineage, and format version
git/*HEAD, branch, status, recent commits, working-tree diff, staged diff

Git collection is read-only and shell-free. It does not inspect untracked file contents, run hooks, or run textconv. Each command has a 512 KiB output budget by default.

Security model

  • Local files only; no network client and no telemetry backend.
  • Redaction touches the exported copy, never the canonical session log or workspace.
  • Sensitive fields, common service/GitHub/npm tokens, authorization headers, AWS access keys, environment assignments, URL credentials, private-key blocks, and local paths are redacted.
  • Capture work is bounded and isolated from the agent loop.
  • In-flight archive writes drain during plugin disposal.

Automated redaction cannot prove that free-form text or source diffs contain no business secrets. Review a capsule before sharing it.

Configuration

Override the bundle row with the same id in the profile patch:

- id: failure-capsule
  name: dsh-failure-capsule
  config:
    outputDir: .dsh/failure-capsules
    maxEvents: 80
    maxGitBytes: 524288
    captureGit: true
    capturePlugins: true
    triggerOnToolError: true
    triggerOnTurnFailure: true
    triggerOnAborted: false
    triggerOnAgentError: true
    resolveSourceMaps: true
    maxSourceMapBytes: 4194304

Relative outputDir values resolve from the session cwd. maxEvents accepts 1..10000; maxGitBytes accepts 1024..16777216; maxSourceMapBytes accepts 1024..67108864. Invalid configuration fails plugin load.

Development

Node ^22.19.0 || >=24.0.0 is required:

npm install
npm run check
npm pack

Tests cover redaction, failure classification, configuration limits, bounded Git collection, source-map stack resolution, deterministic ZIP output, atomic writes, and safe filenames. prepack reruns type checking, tests, and the build.

GitHub releases

After merging to main and confirming CI is green, create a tag that matches the version in package.json:

git tag -a v0.2.1 -m "v0.2.1"
git push origin v0.2.1

The tag triggers the release workflow, which reruns the full check, builds a verified npm pack tarball, and creates a GitHub Release with generated notes. A tag that does not match package.json is rejected.

The repository uses the dsh-plugin topic and declares dsh.bundle.patch, so the Awesome DSH Plugins Radar can discover it automatically.

License

[MIT](LICENSE)