When developing DeepSeek Harness (DSH) plugins, encountering startup failures or tool invocation issues often requires examining log stacks or conversation contexts. However, directly collecting such data involves privacy risks. dsh-plugin-diagnostics provides a privacy-restricted diagnostic service focused on recording plugin lifecycle and task status without collecting conversation content or credentials.
Plugin Overview¶
This is an optional plugin developed by Kerberos255, designed to uniformly collect local plugin loading, failure, and task status, writing logs in JSONL format with daily rotation. It aids in troubleshooting plugin startup issues, tool support status, and scheduled task changes, while strictly limiting the collection of sensitive data.
Core Functions¶
The plugin primarily records the following:
- Lifecycle Events: Collects plugin startup and shutdown events.
- Allowlist Events: Logs specific event names, statuses, durations, security error codes, and tool names.
- Explicit Error Reports: Records errors explicitly reported by plugins via
pluginDiagnostics.record(...). - Schedule Change Notifications: Logs notifications for changes in scheduled tasks, but excludes specific content.
- Privacy Protection: Does not record user messages, answers, prompts, model responses, tool parameters, HTTP bodies, tokens, key values, stack traces, or user identities.
Installation and Activation¶
This plugin requires a compatible DSH host to run. The installation command is as follows:
dsh plugin --profile desktop add github:Kerberos255/dsh-plugin-diagnostics
After installation, restart the DSH host to apply plugin code changes. Other plugins will automatically enable upon detecting the pluginDiagnostics service, without requiring a separate dashboard or settings page.
Logs and Monitoring¶
Logs are the primary basis for troubleshooting issues. The log directory structure is:
DSH_HOME/plugin-diagnostics/logs/<plugin-name>/YYYY-MM-DD.N.l
- File Limits: Generates up to two 1MB files per day.
- Retention Period: Retained for 14 days.
- Degradation Handling: If the log directory is not writable, log entries are silently discarded without blocking user tasks.
Running npm test performs a portable logger test. Using npm pack --dry-run checks the packaged contents.
Use Cases and Notes¶
- Use Cases: Suitable for developers who need to debug plugin lifecycle, tool support results, and task scheduling.
- Privacy Note: Logs contain only metadata but may reveal operation times. Always review
SECURITY.mdbefore sharing logs. - Compatibility: Check the source code and license before installation to ensure DSH host version compatibility.
- Independence: Plugins without logging functionality can still operate normally.
Summary¶
dsh-plugin-diagnostics is a lightweight diagnostic tool based on the MIT license. It provides plugin developers with necessary operational status and error information without invading user privacy.