Introduction¶
When running agents in DeepSeek Harness (DSH), many branching logic paths still depend on the model responding in natural language, which then needs to be parsed by code or subsequent prompts to determine “yes/no, which option, what score”. This approach is fragile: format stability is unreliable, thresholds are difficult to set, and business logic becomes coupled within the prompt.
This article introduces the community plugin dsh-jev (maintained by danbao): it connects TypeSafe Jev (System One) to DSH, providing agents with a jev_ask tool—passing in the state to be evaluated and a set of typed questions, and receiving structured, branchable results (probabilities, choice selections, score levels, etc.) instead of prose responses that require additional parsing.
What Is This¶
dsh-jev is a plugin for DeepSeek Harness (npm package name dsh-jev, current version 0.1.0, MIT license). It does not modify the harness main loop, nor does it bind to decision-layer hooks like agent/pre-step; it simply provides jev_ask at the tool layer, specifically for “typed judgment questions”.
The backend defaults to OpenRouter (just an OpenRouter key is needed); setting backend to typesafe in the configuration switches to the official TypeSafe endpoint. The plugin uses native fetch to call POST /v1/systemone, without depending on vendor SDKs; switching backends mainly involves changing the base URL, key, and model id.
Core Features¶
jev_ask Tool¶
The invocation form (conceptually) is as follows: pass in state and questions[], where each question has id, type, instructions, and type-specific fields like options (for choice) or levels (for score).
jev_ask({
state: "Customer says they were charged twice, three days ago, and is upset.",
questions: [
{ id: "urgent", type: "noul", instructions: "Does this express urgency?" },
{ id: "team", type: "choice", instructions: "Which team should handle this?",
options: ["billing", "technical", "sales"] },
{ id: "anger", type: "score", instructions: "How upset is the customer?",
levels: ["Calm", "Frustrated", "Very angry"] }
]
})
The returned answers are values that code can directly branch on, such as the probability for noul, the selected option and probabilities for each option in choice, and the numeric value and level legend for score; the response also includes the model id and token usage (OpenRouter side may have usage.cost). The example model in the README is typesafe/jev-1.13-20260917.
Question Types¶
| type | meaning | key points |
|---|---|---|
noul |
yes/no type, with probability | The API does not provide confidence, and the plugin does not fake it for Noul |
choice |
select one from many | Must provide options; local validation limits to 255 options max |
score |
ordered levels | Must provide levels, 2–10 levels, from low to high |
Parameter conventions (excerpted from the tool contract):
state: text to be evaluated; all sent content participates in evaluation, so only include the context needed for the questions.state_json: JSON string of structured state; when bothstateandstate_jsonexist,state_jsontakes precedence.- Multiple questions in the same request are evaluated independently and in parallel, suitable for batch atomic questions.
Validation, Keys, and Retries¶
- Dual outbound/inbound validation: question format, answer completeness, whether options are within the question scope, distribution sums to 1, type matching, etc.; if any check fails, the entire call fails—no “half-read” judgments occur.
- API key resolved per call, not cached: literal
apiKey→credentialsservice → process environment; missing key does not prevent plugin loading (logs a warning at load time), error only occurs on firstjev_askcall, allowing plugin installation before key configuration. - Retry classification: 429 / 529 / 5xx / timeout / connection errors trigger backoff retries (respecting
Retry-After); 401 / 403 / 404 / 422 fail immediately.timeoutMslimits individual attempts,budgetMscovers the entire call including backoff.
What v1 Deliberately Does Not Do¶
The plugin does not do decision-layer work (no tool narrowing binding, pre-execution gating, model routing, etc.), does not automatically load skills, modify the harness loop, approve caches or dashboards, and also does not have browser configuration cards; configuration is in cordis.yml / dsh settings documentation, and keys go through credentials or environment variables.
Installation and Enablement¶
DSH loads plugins from dist/, so you need to build locally first. The steps from the official README are as follows.
cd /path/to/dsh-jev
pnpm install
pnpm build # dsh loads from dist/, so build before installing
dsh plugin --profile <name> add /path/to/dsh-jev
dsh --profile <name> --dump-config # expect the "# == dsh-jev" layer and the jev row
For development, you can skip writing to the profile and use a patch override instead:
pnpm dev # tsc --watch
dsh web --patch ./cordis.patch.yml
Runtime requirements: Node ^22.19.0 || >=24.0.0; peer dependencies include @deepseek-ai/cordis (>=4.0.2) and dsh-credentials / dsh-settings / dsh-tools etc. (see repository package.json).
Configuration¶
Minimal configuration only requires an OpenRouter key:
export OPENROUTER_API_KEY=sk-or-...
Other fields have default values; override the config of the jev plugin row in your profile. For complete field descriptions, see the repository cordis.yml. Common item examples:
- id: jev
name: 'dsh-jev'
config:
backend: typesafe # openrouter (default) | typesafe
apiKeyEnv: TYPESAFE_API_KEY # credential reference (an environment variable name)
model: jev-latest # omit to use the per-backend default
timeoutMs: 20000
budgetMs: 45000
maxRetries: 1
| field | default | description |
|---|---|---|
backend |
openrouter |
openrouter | typesafe |
apiKeyEnv |
per backend | OpenRouter → OPENROUTER_API_KEY; TypeSafe → TYPESAFE_API_KEY |
model |
per backend | OpenRouter default jev-1.13; TypeSafe default jev-latest |
timeoutMs / budgetMs |
20000 / 45000 | per-attempt timeout / total call budget (including retry backoff) |
maxQuestions |
64 | maximum number of questions per call |
maxStateChars |
96000 | serialization length limit for state |
If timeoutMs > budgetMs or baseURL is invalid, the settings write will be rejected, preventing documentation/runtime inconsistency.
Typical Usage and Suggestions¶
- Break questions into atomic items: Instead of a single “rate the pitch”, ask separately about market size, technical feasibility, and differentiation, then weight them in business code.
- Batch questions in the same
jev_ask: Parallel evaluation means latency typically doesn’t grow linearly with question count. - Set thresholds yourself: The highest-probability option for
choicedoesn’t necessarily equal “sufficiently certain”; use the returnedprobabilitiesto set thresholds in code.
After the agent calls jev_ask during conversation, use the returned JSON to branch via if/switch, route to different tools or human queues; failures manifest as normal tool call errors, and the model can remedy them based on error messages (e.g., add key, shorten state, fix question format).
Use Cases and Cautions¶
Suitable for: situations requiring repeatable, testable branching judgments in agent workflows—customer service dispatch, urgency detection, sentiment levels, compliance yes/no, etc.—where you want probabilities and option ids in code rather than in prompt strings.
Cautions:
- The plugin runs with the current dsh process permissions; review the GitHub source and MIT license before installing.
- The community directory danbao/dsh-jev on SkillHub is an independent site with no official affiliation with DeepSeek/Quantarium; installation commands follow the repository README (local path
dsh plugin add, not name-basedgithub:owner/repo). - Without an API key, the plugin can still load, but actual calls will fail; in desktop profiles, if
ctx.get('credentials')isundefined, resolution falls back to environment variables.
Summary¶
dsh-jev encapsulates TypeSafe Jev’s structured judgment capabilities into the DSH tool jev_ask: no SDK, OpenRouter default, strict validation, and configurable timeout/retries, enabling agents to receive directly branchable data structures for noul / choice / score question types.
- Directory page: https://www.skillhub.cn/plugins/danbao/dsh-jev
- Source code and documentation: https://github.com/danbao/dsh-jev