When developing agents in DeepSeek Harness (DSH), helping the model understand a user’s emotion or intent and adjust its tone accordingly usually requires complex prompt engineering. The dsh-jev plugin solves this problem. On every conversation turn, it calls typesafe.ai’s systemone (jev) API to analyze user input and injects the result into the context.
Core Features¶
- Emotion/Intent Detection: On every conversation turn, it calls the
systemone(jev) API oftypesafe.aito determine the user’s emotion and intent. - Context Injection: It injects the detection result into the model as runtime context with a source marker, so the model can adjust tone and priority.
- GUI Configuration: All parameters (including the API key) can be configured in the GUI under Settings → JEV Emotion Analysis.
- Export Declarations: Supports exporting the
apply(ctx, config)function, as well asinjectdeclarations for agents.
Installation and Enablement¶
Use the official install command to add the plugin, then restart the host process.
dsh plugin --profile web add github:Excalibur9527/dsh-jev
After installation, you need to restart the dsh web host process for the plugin to take effect.
Configuration and Usage¶
After restarting, configure the parameters under Settings → JEV Emotion Analysis.
Core configuration items:
* Enable JEV Detection: Controls whether to call the API.
* Inject detection result into model context: Controls whether to append the result to the request.
* API Key: Stored in the dsh-jev.apiKey field of settings.yaml, marked as secret, and not returned to the browser via RPC.
* API endpoint: Defaults to https://api.typesafe.ai/v1/systemone.
* Detection question: Supports types such as noul (yes/no), score (rating), and choice (single choice).
Testing API:
You can test the detection result using the provided script:
node scripts/try.mjs "测试文本"
Permissions and Trust¶
This is a community plugin and has no affiliation with DeepSeek AI.
- Outbound network access: Allows only outbound POST requests to
https://api.typesafe.ai/v1/systemone. - Read access: Reads the user’s most recent message and the
dsh-jevconfiguration section in~/.dsh/settings.yaml. - Write access: Writes only to the
dsh-jevsection insettings.yaml. - Key security: The API key is stored in a local file and explicitly removed before RPC responses; it is not sent back to the browser.
- Compatibility: Verified with DSH 0.1.1-rc.2; Node ≥ 22 required.
How It Works¶
The plugin triggers an API call only when a message with source.kind === 'user' is present in the agent/pre-step batch for a conversation turn. The detection result is injected only as natural-language context and does not change required tool fields. If no key is configured, the API returns an error, or the request times out, the plugin passes through unchanged and does not block the conversation.