jackie-cqz/dsh-jev-plugin ↗★ 8

dsh-jev-plugin

接入TypeSafe Jev决策系统的工具集 适合需要调用TypeSafe API进行系统决策的用户。

包名
dsh-jev-plugin
兼容性
待验证
Harness 依赖范围
^0.1.6-alpha.2 || ^0.1.7-rc.2
Cordis 依赖范围
^4.0.2
版本
0.1.0
许可证
MIT
最近更新
2026年9月26日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jackie-cqz/dsh-jev-plugin

Configuration

FieldDefaultDescription
apiKey—TypeSafe API key; takes precedence over apiKeyEnv
apiKeyEnvTYPESAFE_API_KEYEnvironment variable used when apiKey is unset
baseURLhttps://api.typesafe.ai/v1API root; trailing slashes are removed
modeljev-latestDefault model; tools can override it per call
timeoutMs10000Call timeout in milliseconds
retry.maxAttempts3Maximum attempts, including the first
retry.baseDelayMs500Initial backoff in milliseconds
retry.maxDelayMs5000Maximum delay between attempts
maxStateChars64000Maximum serialized state length; 0 disables the limit
confidence.approveAt0.8Confidence threshold for automatic acceptance via verdictFor
confidence.escalateBelow0.5Escalate below this confidence; must not exceed approveAt
policy.enabledfalseEnable the circuit breaker and minimum call interval
policy.failureThreshold5Consecutive failures before opening the circuit
policy.openMs30000Time before allowing a probe call
policy.minIntervalMs200Minimum interval between calls
cache.enabledfalseCache responses for identical model, state, and questions
cache.maxEntries100Maximum cache entries; LRU eviction
cache.ttlMs60000Cache entry lifetime
guard.enabledfalseEnable the tools/pre-execute risk gate
guard.tools[]Tools to check; empty means all tools
guard.questionBuilt-in risk questionQuestion submitted to Jev
guard.levels["low","medium","high","critical"]Ordered risk labels; 2–10 entries
guard.denyAt3Deny at or above this score
guard.askAt1Request approval at or above this score
guard.escalateOnLowConfidencetrueRequest approval below confidence.escalateBelow
guard.reviseAtHighest level indexReject with revision guidance; equal to denyAt by default, leaving no revision band
guard.onError"allow"Gate failure behavior: fail-open (allow) or fail-closed (deny)
rules.enabledfalseEnable synchronous offline denial rules; no API key needed
rules.tools[]Tools to check; empty means all tools
rules.deny[]Additional case-insensitive denial regexes; invalid patterns fail at load time
review.enabledfalseEnable tools/post-execute review; may rewrite completed tool results
review.blockAt / review.onError0.8 / "accept"Correction probability threshold and error behavior
routing.enabledfalseRoute models on agent/request using request complexity and routing.models
context.enabledfalseEnable context pruning on agent/pre-step
context.maxDrops / context.shadow0 / falseDrop limit (0 means unlimited); shadow mode reports without changing context
intent.enabledfalseDecision logic exists, but instruction injection is not connected; enabling this does not inject messages
quotaCooldownMs900000Cooldown after 402, independent of policy.enabled; 0 disables it
enableDecide / enableEvaluatetrueRegister the corresponding tool
telemetry.logfalseEmit a sanitized structured record for each call
telemetry.sampleRate1Sampling fraction from 0 to 1
telemetry.errorRateAlert0.5Error rate threshold for degraded health
telemetry.alertMinCalls10Minimum sample size before reporting health

Validate gate thresholds for your workload: scores and confidence can vary. Changing guard.levels clamps default thresholds into range; explicitly configured out-of-range values fail validation. Start context pruning in shadow mode before allowing it to remove messages.

Oversized state is rejected, never truncated, so a decision cannot silently use incomplete input. Policy, caching, and the risk gate are disabled by default. Intent injection remains unavailable because the host lacks a pre-step message channel that records plugin authorship.

Prefer an environment variable over storing the key in cordis.patch.yml:

export TYPESAFE_API_KEY="..."

PowerShell:

$env:TYPESAFE_API_KEY = "..."

If storing a key in configuration, use the secret role and restrict file permissions. The plugin redacts API keys from tool output, error messages, and logs.