DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-jev-loop

J

dsh-jev-loop

Manifest valid

Jev (TypeSafe System One) judgments at the DeepSeek Harness agent-loop gates. No UI dependency.

hasBundlePatch

dsh-jev-loop

Jev (TypeSafe System One) judgments at the DeepSeek Harness agent-loop gates. No UI dependency: mount it in any Harness composition, headless or otherwise.

This is the core of the Jev loop for moqi. The optional /JevLoop control panel ships separately as moqi-jev-loop, and depends only on the jevLoop service this package provides.

Published to npm as dsh-jev-loop. This repository carries the dsh-plugin topic — the whole of the dshfind listing mechanism: the marketplace indexes public repositories by that topic and syncs daily, so there is no listing step per release.

Install

dsh plugin --profile <profile> add dsh-jev-loop

Then give it a key: set TYPESAFE_API_KEY (or TYPESAFE_APIKEY) in the environment, or store one in the Harness credential store under TYPESAFE_API_KEY. The gates fail open — no key, timeout, 429, or bad JSON never blocks the loop.

The gates

GateEventWhat Jev judgesDecision
Pre-stepagent/pre-stepis the request underspecified?inject an "ask before guessing" instruction
Pre-executetools/pre-executedestructive · exfiltration · off-tasklog / ask / deny
Post-executetools/post-executedid a successful call silently miss?log / block with corrective feedback
Turn-stoppingagent/turn-stopping"is the request actually done?"nudge the turn onward, or pass

All four are automatic. Jev supplies a calibrated probability; this package owns the thresholds and decisions, and every failure — no key, timeout, 429, bad JSON — fails open, so a judgment service that is down never blocks the loop.

Configure them on the dsh-jev-loop row in a profile's cordis.patch.yml (see this package's cordis.patch.yml), or in a profile's own patch layer. The *Enabled defaults can also be overridden at runtime from moqi's /JevLoop panel, which persists to $DSH_HOME/jev-loop.json.

Cost envelope

  • One POST /v1/systemone per judgment; pre-execute asks its three hazards in a single call.
  • State is capped (maxStateChars); the transcript gates only send the last turnStoppingMaxMessages messages.
  • Answers are cached by a SHA-256 of the exact request body, so an unchanged judgment is free.
  • Every judgment is appended to $DSH_HOME/jev-loop.jsonl with probabilities, cache hit/miss, latency, and token usage.

Config

Set on the dsh-jev-loop row in a bundle patch, or in a profile's own patch layer.

FieldDefaultMeaning
apiKey—literal key; prefer apiKeyEnv so no secret is in a config file
apiKeyEnvTYPESAFE_API_KEYenv var read for the key; TYPESAFE_APIKEY is also read
modeljev-latestTypeSafe model alias
baseUrlhttps://api.typesafe.ai/v1/systemoneevaluation endpoint
timeoutMs3000per-request timeout
maxRetries2retries on 429/529, network errors, timeouts
maxStateChars24000hard cap on state sent to Jev
cacheEntries500in-memory cache entries
auditPath$DSH_HOME/jev-loop.jsonlJSONL audit trail
statePath$DSH_HOME/jev-loop.jsonpersisted gate toggles
preStepEnabledfalsejudge the request before the first step
preStepThreshold0.7clarification probability that injects a question
preExecuteEnabledtruejudge tool calls before dispatch
preExecuteModeloglog observes, ask requests approval, deny refuses
preExecuteThreshold0.7hazard probability that flags a call
preExecuteSkip[]tool names to ignore
postExecuteEnabledtruecheck a successful tool result
postExecuteModeloglog observes, block turns feedback into an error
postExecuteThreshold0.7miss probability that blocks a result
turnStoppingEnabledtruecheck the turn before it closes
turnStoppingThreshold0.5completion probability below which to nudge
turnStoppingMaxSteers2nudges per turn, so a wrong judgment cannot loop
turnStoppingMaxMessages14transcript messages fed to the completion judgment

Test it

npm install            # typescript + @types/node
npm run link-harness   # symlink the installed harness's @deepseek-ai packages
npm run build
npm test               # gates, keyring, loop — no Harness, no network
npm run install-profile -- jev-core   # throwaway profile with just this bundle
TYPESAFE_APIKEY=… dsh --profile jev-core

~/.dsh/jev-loop.jsonl records every judgment.

To exercise the Harness-only build inside your own profile, list just the core bundle:

bundles: ['@deepseek-ai/dsh-base', 'dsh-jev-loop']

Layout

src/gates.ts   the four judgments and their copy, as pure functions
src/keyring.ts key resolution order, storing, probing, clearing
src/loop.ts    JevLoop: state assembly, per-turn budgets, audit, one method per gate
src/jev.ts     the TypeSafe client: a Judger port and its live adapter
src/render.ts  derived session messages -> plain text
src/index.ts   the Cordis adapter: config, event wiring, effects
tests/         the modules above, driven directly
scripts/       harness linking and the throwaway profile installer

Docs

The module boundaries, the seams, and the generated whiteboard are documented in docs/ARCHITECTURE.md.

Comments

Loading…

Similar plugins

dsh-plugin-jev

by kaijia323

TypeSafe Jev (System One decision model) as a native jev_decide tool plugin for DeepSeek Harness

Security & AuditManifest valid

★ 0

MIT

JavaScript

Sep 20, 2026

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

by RaulLazaro

Ask Jev (TypeSafe System One) typed questions from DeepSeek Harness: batch judgements with probabilities, configured per user in Settings.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 29, 2026

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

by xienda

TypeSafe Jev (System One decision model) agent tools for DeepSeek Harness: jev_decision (choice/score/noul, parallel, typed answers + confidence), auto-guard (deterministic + Jev risk/loop checks), a

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 1

↓ 957/wk

MIT

JavaScript

Sep 30, 2026

dsh plugin --profile web add dsh-jev-verify

by jackie-cqz

DeepSeek Harness plugin for TypeSafe Jev: typed decisions, configurable guardrails, and Web UI result cards.

Manifest valid

★ 8

MIT

TypeScript

Sep 26, 2026

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

Semantic tool routing, skill discovery, and typed System One decisions for DeepSeek Harness powered by TypeSafe Jev.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add dsh-jev

by BetterZflyee

Use the Jev (System One) decision-model paradigm with any OpenAI-compatible LLM — no TypeSafe key required. Registers a jev_decide tool on DeepSeek Harness (dsh).

Tools & CapabilitiesManifest valid

★ 4

MIT

JavaScript

Sep 21, 2026

dsh plugin --profile web add dsh-jev-adapter