dsh-jev-plugin: A Typed Decision Plugin for DeepSeek Harness

In DeepSeek Harness (DSH) agent development, LLM text output often needs to be converted into structured decisions. TypeSafe Jev (System One) provides structured decision primitives, but DSH does not directly support them. The dsh-jev-plugin wraps Jev’s capabilities as DSH tools, enabling agents to use typed decisions while providing configurable guardrails and review mechanisms.

Plugin Overview

dsh-jev-plugin is a standalone package that can be installed via dsh.bundle without modifying the DSH repository. It is maintained by jackie-cqz, current version v0.1.1, and is licensed under MIT.

Core Features

  1. Jev primitive tooling: Exposes the three core Jev primitives as DSH tools.
    • noul: Used for yes/no decisions and returns a probability value (0–1).
    • choice: Used for selecting a label and returns the selected label, probability distribution, and confidence.
    • score: Used for ordinal scoring and returns the score, probability distribution, and confidence.
  2. Configurable guardrails and review:
    • Guardrails: Provides risk interception mechanisms and performs safety checks before tool execution.
    • Review: Provides post-execution review mechanisms and can correct completed results.
  3. Web UI result display: Supports displaying result cards in the Web interface.

Installation and Enablement

Before installation, verify environment compatibility: the required Node.js version is >= 22, and the supported DSH target version range is ^0.1.6-alpha.2 to ^0.2.1-alpha.2.

1. Initialize Web configuration (if Web UI is needed)

If using the Web interface, initialize the configuration file first:

dsh --profile jev-dev --from-default-profile web --dump-config

2. Add the plugin

Add the plugin from GitHub (specifying a version tag to pin the version):

dsh plugin --profile jev-dev add github:jackie-cqz/dsh-jev-plugin#v0.1.1

After installation, the plugin automatically registers the decide and evaluate tools (whether they are registered can be controlled by the configuration options enableDecide and enableEvaluate).

Configuration and Usage

The plugin requires a TypeSafe API key and controls feature toggles through configuration options.

Basic Configuration

The API key must be configured. It can be set directly or through the environment variable TYPESAFE_API_KEY.

{
  "apiKey": "YOUR_TYPESAFE_API_KEY",
  "apiKeyEnv": "TYPESAFE_API_KEY",
  "baseURL": "https://api.typesafe.ai/v1",
  "model": "jev-latest"
}

Enable Guardrails

Intercepts risks before tool execution. Set guard.enabled to true and configure risk levels (for example, ["low","medium","high","critical"]).

{
  "guard": {
    "enabled": true,
    "tools": [],
    "denyAt": 3,
    "askAt": 1,
    "escalateOnLowConfidence": true
  }
}

Enable Review

Corrects results after tool execution. Set review.enabled to true and configure the correction probability threshold.

{
  "review": {
    "enabled": true,
    "blockAt": 0.8,
    "onError": "accept"
  }
}

Enable Offline Rules

Performs synchronous interception using regular expressions without making API calls.

{
  "rules": {
    "enabled": true,
    "tools": [],
    "deny": []
  }
}

Use Cases and Considerations

This plugin is suitable for DSH projects that require structured decision output, strict risk control, or mandatory review mechanisms. Because it is a standalone package, it is recommended to check the source code and license (MIT) before installation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye