dsh-jev
TypeSafe Jev System One semantic tool routing and typed decisions for DeepSeek Harness (DSH)
- Stars
- 0
- Language
- JavaScript
- Created
- Sep 19, 2026
- Updated
- Sep 19, 2026
Introduction
dsh-jev
Semantic tool routing and typed System One decisions for DeepSeek Harness (DSH) powered by TypeSafe Jev.
Modeled after the Pi Jev extension (pi-jev), this plugin natively integrates TypeSafe Jev into DeepSeek Harness using Cordis service injection, DSH tool definitions, human slash commands, and pre-turn lifecycle hooks.
Features
- Typed Judgments (
jev_evaluatetool): Run fast, calibrated System One decisions directly from any LLM turn in DSH usingchoice(categorical selection),noul(yes/no probability), andscore(rubric scale). - Skill Discovery (
jev_find_skilltool): Semantically matches and suggests the most relevant specialized agent skills (SKILL.md) for any task without cluttering prompt context. - Tool Discovery (
jev_find_toolstool): Semantically evaluates and identifies relevant registered tools in DeepSeek Harness for a user task. - Human Slash Commands (
/jev):/jev status— Displays TypeSafe Jev configuration, key origin, session metrics (requests, tokens, latency), and tool/skill counts./jev test [prompt]— Run live connectivity test or evaluate a prompt against Jev./jev skills [query]— Semantically search and rank available skills directly from the chat box./jev tools [query]— Semantically search and rank available tools directly from the chat box./jev auto [on|off]— Toggle automatic per-prompt skill suggestions./jev help— Display help.
- Auto Mode Hook (
agent/pre-step): Opt-in background evaluation that semantically detects matching skills for incoming user prompts and injects guidance to invoke the relevantskilltool before executing actions. - Post-Run Gate CLI (
dsh-jev-gate/jev-gate): Standalone binary for CI/CD pipelines, subagents, or verification gates. Checks git diff (HEADor cached), file, or stdin against natural language acceptance criteria using Jev probability (exits0on pass,1on reject,2on error). - Graceful Fallback & Zero Crash: Fails open to local keyword heuristic shortlists when Jev is unconfigured or offline, ensuring uninterrupted agent execution.
Architectural Differences from Pi Jev
In keeping with DeepSeek Harness's design:
- Subagents: DSH possesses its own first-party native subagent service (
@deepseek-ai/dsh-subagentwith typert protocol and session trees); external RPC workflow scripts frompi-subagentsare omitted in favor of DSH's native architecture. - Model Selection: DSH manages model presets and reasoning effort via
agent-default-modelandsettings.yaml; auto-model switching per prompt is omitted to prevent overriding user-configured preset pipelines. - Compaction: DSH's session log projection is handled natively by
@deepseek-ai/dsh-compaction.
Installation in DeepSeek Harness
1. Link or Install the Plugin
In your DSH profile directory (e.g. ~/.dsh/profiles/web):
# Install via GitHub or local link
pnpm add github:lldois/dsh-jev
# or link local workspace
pnpm add file:C:/Users/lldois/workspace/dsh-jev
2. Register in Profile Bundles
In ~/.dsh/profiles/web/package.json, add "dsh-jev" to dsh.profile.bundles:
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"dsh-jev"
]
}
}
}
The bundled cordis.patch.yml will automatically insert id: jev into the Cordis plugin loader.
Setup & Credentials
Set your TypeSafe API key via any of the following methods:
- Environment variable:
export TYPESAFE_API_KEY=your_key_here - DSH secret file:
Write the key to
~/.dsh/secrets/typesafe_api_key. - Cross-agent secret file:
Write to
~/.pi/agent/secrets/typesafe_api_key. - Workspace
.env: Located inworkspace/chat/typesafe-eval/.env. - DSH Settings:
Configured in
~/.dsh/settings.yamlunder thejev:namespace.
Verify your setup by running:
/jev status
Tools
1. jev_evaluate
Used by the model to get structured decisions, classifications, triage, and scoring.
{
"state": "The user reported an unexpected 500 error on /api/checkout",
"questions": {
"is_incident": {
"type": "noul",
"instructions": "Is this message reporting a production incident?"
},
"category": {
"type": "choice",
"instructions": "Which service does this error belong to?",
"criteria": {
"checkout": "Payments and checkout flow",
"auth": "User authentication and tokens",
"search": "Catalog search service"
}
},
"severity": {
"type": "score",
"instructions": "Rate severity of the issue",
"criteria": ["minor", "major", "critical"]
}
}
}
2. jev_find_skill
Used by the agent or user to semantically find specialized workflows and instructions for complex tasks.
{
"query": "build accessible modal component in React",
"threshold": 0.65
}
3. jev_find_tools
Used by the agent to find the most relevant tools registered in the current session.
{
"query": "query database table schema and row count"
}
CLI Gate Checker (dsh-jev-gate / jev-gate)
Check git changes or command output against natural language criteria:
# Check git diff against acceptance criteria
dsh-jev-gate -c "All exports have TypeScript type annotations" -d
# Check piped test/lint output
npm test 2>&1 | dsh-jev-gate -c "Zero test failures and no unhandled rejections"
# JSON output with custom threshold
dsh-jev-gate -c "Documentation updated" -f ./README.md -p 0.85 --json
Exits with 0 on pass, 1 on reject, 2 on error (or 0 with --fail-open).
Running Tests
node --test test/*.test.js
License
MIT © lldois