Preface¶
When developing agents in DeepSeek Harness (DSH), a common requirement is not “generate another block of explanatory text,” but rather to make judgments about the current state: which team a ticket should be routed to, how high its priority is, whether a certain claim holds, how candidate solutions should be ranked. If you rely entirely on the main conversation model to improvise freely, the output is often natural language, making it difficult to stably integrate with routing, threshold gating, or automated branching.
Below we introduce the community plugin dsh-typesafe-ask (maintainer onepayzk-glitch). It exposes the tool typesafe_ask within Harness, sending the state to be evaluated along with a set of typed questions to TypeSafe’s System One model Jev (POST /v1/systemone), returning structured answers with calibrated probabilities for direct use by code or agent logic.
What Is This¶
dsh-typesafe-ask is categorized as a “model reasoning” entry in the DSH community plugin catalog (catalog page: skillhub.cn/plugins/onepayzk-glitch/dsh-typesafe-ask). Source code and documentation are available in the GitHub repository, licensed under MIT.
The plugin’s positioning can be summarized as: giving Harness agents a “decision oracle”—inputting typed questions and outputting selected branches, scale scores, or probabilities that statements are true, rather than replacing the main chat model to write long-form text or code.
Core Functions¶
After installation and API Key configuration, the main capabilities are as follows.
| Entry Point | Purpose |
|---|---|
Tool typesafe_ask |
Sends state and a question mapping to TypeSafe, returning structured answers in the conversation |
| Settings page Settings → TypeSafe / Jev | One-time paste of the API Key; the key is stored via Harness’s credential store and is not written to the profile config file |
Tool parameters (excerpted from the README):
| Parameter | Type | Required | Meaning |
|---|---|---|---|
state |
string | object | array | Yes | Content to be evaluated: text, records, or application state |
questions |
object | Yes | Mapping of question IDs to typed question definitions |
model |
string | No | Defaults to jev-latest |
Three types of questions are supported:
- choice: Select one item from the options given in
criteria. - score: Locate a position on an ordered scale (
criteriais an array of specific situational descriptions). - noul: Return the probability that a statement is true (no separate confidence field).
A typical return format example:
department: choice=technical (confidence=0.78) [technical=0.85, billing=0.15, sales=0]
frustration: score=1=Frustrated but civil (confidence=1)
is_urgent: noul=0.99
Applicable judgments include: routing requests to the correct handler, ticket classification, urgency or emotional intensity scoring, candidate ranking, and gatekeeping operations after confidence thresholds are met—the README explicitly states that Jev does not generate text, write code, stream output, or call tools, and cannot replace the chat model behind the agent (TypeSafe documentation Jev with coding agents provides details).
Installation and Activation¶
The DSH ecosystem adopts an “everything is a plugin” extension approach; the community catalog is an independent site with no official affiliation with DeepSeek / 幻方. Before installation, it is recommended to review the repository source code and MIT license yourself; the plugin runs under the permissions of the current dsh process and requires access to api.typesafe.ai.
Method 1: Plugin Market
- Open Settings → Plugin Market
- Search for
typesafe-ask - Install
Method 2: Command Line
dsh plugin --profile <your-profile> add dsh-typesafe-ask
After completing the steps above, restart or refresh the Harness, open Settings → TypeSafe / Jev, create an API Key from console.typesafe.ai/keys, and paste it. The key is only read from the credential store during host-side tool calls.
If you need to change default settings (e.g., credential reference name, model, endpoint, timeout), you can override the plugin row in the profile’s cordis.patch.yml, for example:
- id: dsh-typesafe-ask
config:
apiKeyRef: MY_TYPESAFE_KEY
model: jev-latest
baseUrl: https://api.typesafe.ai/v1/systemone
timeoutMs: 60000
The plugin package defaults apiKeyRef to TYPESAFE_API_KEY and model to jev-latest; in market hot-mount scenarios, the plugin row can be a bare insert, allowing mounting without restart (see the README Configuration section for details).
Typical Usage¶
Once the Key is configured, you can use natural language to ask the agent to make judgments (e.g., “Which team should handle this ticket?”), or have the agent call typesafe_ask autonomously.
First design the questions, then construct a single call. The JSON example below comes from the README and shows how to write the three types of questions:
{
"department": {
"type": "choice",
"instructions": "Which team should handle this",
"criteria": {
"billing": "Payment or subscription issues",
"technical": "Bugs or integration problems",
"sales": "Pricing or account questions"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated the customer appears",
"criteria": ["Calm, just stating facts", "Frustrated but civil", "Very angry, strong language"]
},
"is_urgent": {
"type": "noul",
"instructions": "The message conveys urgency or time-sensitivity"
}
}
Multiple questions in the same call will evaluate the same state in parallel, and they cannot see each other’s answers; only when preceding answers are needed to construct a new state or new options should a second call be initiated.
Notes on Designing Questions¶
The “Designing good questions” section of the README is worth practicing against after installation:
- Ask multiple independent dimensions at once; do not force judgments that should be stepped and dependent into the same round.
- Each question carries only one narrow and coherent judgment; the question ID is not sent to the model, and semantics should be written in
instructions. - When multiple labels may hold simultaneously, use multiple
noulto ask separately rather than forcing achoice. - Each level of
scoreshould be a independently understandable specific situation; avoid vague labels like “low/medium/high”; the returned score may be a score position with probability weights. - Low
choiceconfidence usually indicates overlapping options; tighten the mutual exclusivity ofcriteriarather than simply lowering the threshold. - Thresholds are calibrated by business data;
noul ≈ 0.5means positive and negative probabilities are equal, not “medium intensity.”
Applicable Scenarios and Boundaries¶
Suitable for: Making branchable structured judgments in Harness workflows—routing, classification, scoring, ranking, probability-based gating—and willingness to use TypeSafe Jev as a dedicated System One reasoning surface.
Boundaries (README Boundaries):
- Relies on external network access to
api.typesafe.ai. - The API Key is a server-side key, stored only in the credential store.
- Jev cannot replace the main chat model for generative tasks.
The plugin is pure ESM with no build step; package.json declares a DSH engine of >=0.1.0-rc.1 and Node >=20. The current repository has 0 GitHub stars and is a relatively new community contribution; use the latest README in the repository as the standard before using.
Conclusion¶
dsh-typesafe-ask integrates TypeSafe Jev’s typed questions and calibrated probabilities into the DSH toolchain, giving agents a stable, programmable path when they need to “judge” rather than “narrate.”