Introduction¶
When running agents in DeepSeek Harness (DSH), system prompts and tool permissions are typically static: whether the user’s tone is polite or sharp, the underlying behavior often remains unchanged. If you want to “be more proactive when praised, more dismissive when scolded, and block tools when the score drops below a threshold,” you need to hook into state and guards at the framework level, rather than relying solely on role-playing style prompts. dsh-mood (yinque91/dsh-mood) is a community “Model Reasoning” plugin that uses keyword scoring to maintain a positivity level between 0–100, injects this into the systemPrompt, and hard-blocks non-emotion-related tool calls via ctx.tools.guard during a strike.
What is this¶
dsh-mood is the Emotion Engine for DSH: receiving “thank you” increases positivity, while being scolded decreases it; if it drops below a configured threshold, it goes on strike—refusing all tool calls except mood_* until the user says something nice, manually uses mood_set, or the score naturally recovers over time. Maintained by yinque91; the source code and documentation are available on GitHub and the SkillHub directory. Licensed under MIT, package version 0.1.0, requires Node.js >= 20.
This differs from “pretending to have emotions in prompts only”: in strike mode, the guard physically intercepts tools. The model might still ignore the prompt and keep talking, but it will not have access to tool execution rights.
Core Features¶
Events and Scoring¶
User messages trigger emotion scoring via the agent/inbox/inserted event: keywords (Chinese/English), intensity, and negation are factored into the calculation. Example weights in the README are +8 for praise and −18 for insults (negative is weighted heavier). Positivity is stored locally in ~/.dsh/mood/state.json and does not sync across devices.
Decay and Median¶
By default, it pulls back 0.5 per minute toward the median of 50 (decayPerMin), so the effect of praise or scolding gradually softens over time.
Prompt Injection and Tool Guard¶
Positivity is written into systemPrompt.context (injected as a status line every turn). When positivity ≤ strikeAt (default 20), a strike is triggered: all tool calls are rejected except mood_status, mood_test, and mood_set. Recovery paths include positive user feedback, mood_set(level), or waiting for decay to recover the score.
Built-in Tools¶
| Tool | Function |
|---|---|
mood_status |
View current positivity, recent events, strike status, and the specific text line injected this turn |
mood_test |
Score a piece of text without changing state (for debugging or testing) |
mood_set |
Set positivity to 0–100; remains available during a strike as a manual recovery entry point |
Positivity only affects the prompt seen by the model and the tool guard; it does not alter actual inference parameters like temperature or token budgets.
Installation and Activation¶
The plugin runs with the permissions of the current dsh process; please review the repository source code and MIT license before installing.
-
Place the repository in a local directory (do not rely on undocumented remote installation names in the intro).
-
Execute the installation command from the official README under the corresponding profile (replace the placeholder with the absolute path to this directory):
dsh plugin --profile desktop add <absolute path to this directory>
- Restart DSH or let the profile hot-reload; the tools and injection will then take effect.
Typical Usage¶
Observing State¶
When you need to confirm if a strike is currently active or view the text to be injected into the system, call mood_status.
Debugging Scoring Rules¶
To test the score adjustment for a specific user sentence without persisting it, use mood_test.
Overriding Configuration¶
Override plugin configuration in the profile’s cordis.patch.yml, for example:
- id: mood
name: dsh-mood
config:
baseline: 50 # Median
strikeAt: 20 # Strike if below this
decayPerMin: 0.5 # Recovery rate per minute
If you need to pull the score back immediately after a strike, use mood_set to a value higher than strikeAt.
Use Cases and Boundaries¶
Suitable for: Local DSH experiments, demonstrating the chain of “user tone → observable state → tool strategy,” or adding a lightweight emotional feedback layer to an agent without modifying the model service itself.
Boundaries (As stated in the README):
- Keyword matching only, no semantic understanding: expressions resembling negative words may result in incorrect deductions.
- Strike is a combination of soft constraints and hard guards: the prompt can be ignored by the model, but the tool layer will still block it.
- State is a single file, single machine, with no multi-device sync.
The community directory SkillHub has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin,” and this is one such example.
Conclusion¶
dsh-mood turns positivity into a state machine that can be stored, injected, and used to intercept tools, making it suitable for quick trials on the DSH desktop profile. Details and updates are subject to the repository: https://github.com/yinque91/dsh-mood; Directory entry: https://www.skillhub.cn/plugins/yinque91/dsh-mood.