Preface

When writing DeepSeek Harness (DSH) plugins, a common pain point is that outside of the documentation, you can’t really know exactly which events are emitted inside the harness, nor how the waterfall dispatch chain works, other than scouring the source code or inserting logs everywhere. Logs are scattered everywhere, forgotten after reading, and it’s also difficult to answer questions like “how many times did this type of event trigger today?”

The dsh-event-auditor introduced below addresses this issue: it collects events flowing through the harness, counts them by type and dispatch mode, and provides a web panel for you to view them at any time.

What is this

dsh-event-auditor is a DSH plugin, designed as a “Harness Event Stream Audit Panel”: observing event types, dispatch modes, counts, and recent events to help plugin authors understand what is happening inside the harness. The author is qing3a, and the license is MIT.

The README notes its status as: Verified and running in a local DSH source environment (2026-08-14), and completed empirical testing of waterfall runtime capture using the mock-llm solution, with 74 events / 12 waterfalls all captured.

What it listens to

The plugin listens to two categories of event sources:

  1. 22 harness emit events, covering agent lifecycle, session, tools, subagent, configuration, etc.;
  2. 10 waterfall events, including tools/execute, approval/request, fs/write-intent, llm/stream, etc. The plugin calls next() in an observational pass-through manner, not affecting the original dispatch chain.

For the complete event list and declaration locations, see the generated document docs/event-producer-consumer.zh.md in the repository.

Counting, Buffering, and Panel

Collected events are organized as follows:

  • Counted separately by event name and dispatch mode;
  • A ring buffer retains the most recent 500 entries;
  • Provides a /audit panel, which is a static page;
  • Also exposes a /api/audit/events JSON interface, supporting ?since= incremental queries, convenient for writing your own scripts to fetch.

This means there is a programmatic data retrieval path outside the panel. If you want to connect the data you observe to other tools, simply consume this JSON interface.

Grouping Switches and Settings Hot-Reload

Events are managed across six groups: agent / session / tools / subagent / config / waterfall. The config group is disabled by default; the other groups are enabled by default.

Switches are implemented via the settings panel for hot-reload: the plugin uses installSettingsSection to register configuration items; modifying grouping switches in the settings panel takes effect immediately without needing to restart the harness.

Headless Mode

If there is no interactive panel in the environment, you can trigger a dump via the environment variable DSH_EVENT_AUDIT_DUMP, directly outputting the collected events.

Installation and Uninstallation

For production installation, use the npm package name. First add the plugin, then start DSH with the corresponding profile:

dsh plugin --profile <profile> add @qing3a/dsh-event-auditor
dsh --profile <profile>
# Open http://localhost:<port>/audit

The uninstall command is as follows:

dsh plugin --profile <profile> remove @qing3a/dsh-event-auditor

Regarding dependencies, the plugin declares @deepseek-ai/dsh-host-webserver in peerDependencies, and includes @deepseek-ai/schemastery ^3.0.0 in dependencies.

Development Mode

If you want to modify the code or run the repository source code directly, first clone and build, then install it into the local DSH directory using a link method. Requires Node >= 22 and pnpm:

git clone https://github.com/qing3a/dsh-event-auditor.git
cd dsh-event-auditor && pnpm install && pnpm build
cd <path-to-deepseek-harness>
dsh plugin --profile <profile> add link:$(pwd)/dsh-event-auditor

After the above steps, the plugin will be attached to the current DSH environment in the form of a local link. After modifying the source code and rebuilding, you can see the effect.

Suitable Scenarios and Notes

This plugin is suitable for two types of people:

  1. DSH plugin authors who want to confirm if the events they listen to and the waterfall chain trigger as expected;
  2. Developers doing headless or automated troubleshooting who need to obtain event data via the DSH_EVENT_AUDIT_DUMP and /api/audit/events interfaces.

A few notes:

  • The config group is disabled by default; if you care about configuration events, you need to manually enable them in the settings panel;
  • The ring buffer only retains the most recent 500 entries; for long-running scenarios where complete history needs to be retained, you should pull incrementally via the JSON interface;
  • The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license before installing. This plugin is under the MIT license, and the source code can be found on GitHub.

Summary

dsh-event-auditor does things very sparingly: it unfolds the internal event stream of the harness for you to see—types, dispatch modes, counts, the most recent 500, plus panel hot-reload and headless dump. For plugin authors who need to understand the internal mechanisms of DSH, it saves the time spent inserting logs everywhere and scouring the source code.

Plugin directory page: https://www.skillhub.cn/plugins/qing3a/dsh-event-auditor (The community directory is an independent site and has no official affiliation with DeepSeek or HF).

Source code repository: https://github.com/qing3a/dsh-event-auditor