dsh-plugin-error-radar: Tool Reliability Radar

Introduction

The DeepSeek Harness (DSH) plugin system emphasizes “everything is a plugin.” When developing agents, the tool-trace plugin records the data and latency of every invocation. However, when facing hundreds or thousands of calls, how can one quickly distinguish between a “glitch” and a “systemic failure”? dsh-plugin-error-radar aims to solve this problem. It reads the sidecar data from tool-trace, calculates error rates, consecutive failure streaks, and p95 latency per tool, and provides a one-screen health assessment.

Core Features

This plugin primarily includes the following capabilities:

  • Data Reading: Reads data from the tool-trace sidecar directory (default ~/.dsh/tool-trace).
  • Metric Calculation: Calculates the error rate, consecutive failure count (loss streaks), and p95/slowest latency for each tool.
  • Silence Mechanism: Suppresses alerts for calls with a sample size less than 3, avoiding false alarms where a single glitch is mistaken for a systemic issue.
  • Command Line Tools: Provides two commands, /radar and /health, for radar scanning and health assessment respectively.

Installation and Configuration

The installation process requires manually merging the configuration file.

  1. Install Plugin:
    Use the official installation command to add the plugin to the current profile:
    dsh plugin --profile web add github:121212165/dsh-plugin-error-radar
  1. Merge Configuration File:
    After installation, you need to manually merge the contents of cordis.patch.yml from the repository root into $DSH_HOME/profiles/web/cordis.patch.yml. By default, this file is an empty array. It is recommended to replace the entire file or insert into the same array; do not simply append, otherwise it may cause YAML parsing errors.

  2. Restart Service:
    Both the configuration layer and the client need to be restarted to take effect.

Usage

The plugin provides two main commands for viewing the health status of tools.

/radar

Outputs statistics for each tool in descending order of error rate. The output includes: call count, error rate, consecutive failures, p95 latency, slowest latency, and the alert section below.

/health [--days 3]

Synthesizes tool call volume, latency, and radar alerts into a one-screen assessment.
* Default Window: By default, only looks at the last 3 days.
* Parameter Adjustment: Use the --days parameter to adjust the statistical window (range 1-365).
* Conclusion:
* ✓: No alerts, the tool surface is clean.
* △: No consecutive failures, but other anomalies exist.
* ❌: Systemic failure exists (e.g., consecutive failures), recommended to fix first.

Configuration

Field Default Value Description
enabled true Whether to enable the plugin
dataDir ~/.dsh/tool-trace tool-trace sidecar directory (read-only)
errorRateAlert 20 Error rate alert threshold (percentage 1-100)

Known Limitations

  • Sample Limitation: Deliberately does not alert when the sample is extremely small (< 3 calls).
  • Write Access: This plugin only reads tool-trace data; write access remains with the tool-trace plugin.
  • Data Fault Tolerance: Corrupted lines will be skipped and counted at the end of the output.

Related Links

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye