dsh-jev-decide: Integrating the TypeSafe Jev Decision Model into DSH

Introduction

The DSH plugin allows developers to extend agent capabilities. The role of dsh-jev-decide is to register an agent tool named jev_decide, integrating TypeSafe Jev (“System One” decision model) into DSH. It solves the problem where, when an agent needs to make fast and accurate judgments (such as message urgency grading, intent routing, or guardrail checks), it calls Jev to obtain structured probabilistic outputs instead of relying on the conversational model to guess based on intuition.

Core Features

This plugin primarily provides the following capabilities:

  1. Tool Registration: Registers the jev_decide tool within DSH.
  2. Three Type Support: Supports three types of judgments: noul (Yes/No), choice (multiple choice), and score (ordered scoring).
  3. Probabilistic Output: Returns calibrated probabilities along with confidence levels.
  4. Zero-Config Credentials: Reuses DSH credentials, eliminating the need for additional API Key configuration.
  5. Built-in Retries: Built-in retry mechanism for status codes 429 and 529.

Installation

You can install it directly via the official command:

dsh plugin --profile web add dsh-jev-decide

Alternatively, you can install it via npm (requires npm >=7 or pnpm auto-install-peers):

npm install dsh-jev-decide

Configuration

The plugin’s data directory configuration is set to $DSH_HOME/plugins/dsh-jev-decide/config.json (or via the cordis patch config:):

{
  "model": "jev-latest",
  "timeoutMs": 15000,
  "baseUrl": "https://api.typesafe.ai/v1"
}

Usage

When calling the jev_decide tool, the following parameters must be passed:

jev_decide({
  state: string,            // Required, the content to evaluate (plain text)
  question: string,         // Required, the judgment to be made
  type?: 'noul' | 'choice' | 'score',   // Defaults to noul
  options?: string[],       // Required (≥2) when type=choice
  levels?: string[],        // Required (≥2, from low to high) when type=score
  yes?: string,             // Optional when type=noul: what counts as YES (sharpen calibration)
  no?: string,              // Optional when type=noul: what counts as NO
  model?: string,           // Defaults to jev-latest
})

Notes

  1. Use Cases: Jev does not generate text; it is intended solely for judgment. It is not suitable for text generation tasks such as writing code or copywriting.
  2. Peer Dependencies: The host does not inject the bundled @deepseek-ai/dsh-tools into the plugin’s module resolution chain. When accessing source code via link: or local paths, you must run npm install once within the plugin directory to materialize the peer dependencies.
  3. Manual Wiring Upgrades: For profiles that have already been manually wired using Method 3, do not run dsh plugin add on them again, otherwise, a duplicate loader entry id error will occur.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye