Introduction¶
The dsh-calm plugin for DeepSeek Harness provides sentiment checkpoints and relationship recovery. When an agent encounters user abuse or emotionally agitated interactions, it does not simply push back or ignore the issue; instead, it enters a soothing mode to repair the relationship. When the user is ready to continue, it folds and seals the argumentative segment, injects a concluding summary, and lets the model continue executing tasks from a clean context.
This plugin is maintained by wobenshiwomu and is open source under the MIT License.
Core Features¶
The plugin performs deterministic classification of user messages in the agent/pre-step phase and supports five states: abuse (verbal abuse), noise (insubstantial noise), mixed (abuse plus a task), substantive (task/continuation signal), and distress (help-seeking signal). Based on classification results, it performs the following operations:
- Soothing mode
Injects a calm note into the message batch, confirms the actual intent without arguing back, and mechanically blocks write-type/command-type tool calls (while allowing read-only tools). - Recovery (trim + summary)
After the user provides a substantive instruction, it usessurfaceOp: replaceto summarize the argument segment, removes it from the model-visible surface, while retaining it in the logs. Audit metadata is recorded in the message’ssource.calmfield. - Termination (rolling window)
During soothing, if there is no substantive content for N consecutive turns (default 5), the plugin folds and seals the current conversation and terminates it mechanically. A new session can continue without affecting files or progress. - Access policy
The model can use theopen_sealedtool to review sealed records. By default it returns a redacted version (masking abusive content). To read the original text,allowRawSealedRead: truemust be configured. Every access is logged. - State persistence across restarts
The plugin uses calm messages in the logs to automatically rebuild the soothing state, so the current state is not lost after a process restart.
Installation and Enablement¶
Before installing, ensure the DeepSeek Harness version is >=0.2.0-rc.1 and the runtime environment is Node.js ^22.19.0 || >=24.0.0.
Install directly using the official command:
dsh plugin --profile web add 'https://codeload.github.com/wobenshiwomu/dsh-calm/tar.gz/v0.1.0'
After installation, restart DSH so the configuration takes effect. The plugin supports mounting local source code for hot-reload development.
Configuration¶
The plugin supports the following configuration options (default values):
window: rolling window; after how many consecutive turns with no substantive content during soothing to end the session (default 5).enableTermination: whether to enable auto-termination (default true).denyPattern: regular expression for tool names temporarily blocked in soothing mode (e.g.bash\|shell\|pwsh\|write\|edit).allowRawSealedRead: whether to allow the model to directly read the original sealed text (default false).
Typical Usage¶
Run local simulation tests to verify classification, soothing, rolling window, trimming, sealing policies, and cross-restart logic:
npm install
npm test
Notes¶
- Summary mechanism: The current summary feature is a heuristic extraction; an upgrade point for connecting to LLM summarization is reserved.
- Folding mechanism: The folded interval is constrained by the “protected header” contract of dsh-session. If rejected, it degrades to normal appending, avoiding session state lockout.
- File rollback: The plugin is not responsible for file state rollback; it is recommended to use it together with
dsh-rewind. - No prior context handling: If the conversation begins with abuse, the recovery summary will state that there is no recoverable task context.
Directory and Source Code¶
- GitHub source: https://github.com/wobenshiwomu/dsh-calm
- Ecosystem directory: https://www.skillhub.cn/plugins/wobenshiwomu/dsh-calm