dsh-plugin-jev
TypeSafe Jev (System One decision model) as a DeepSeek Harness tool plugin 适合需要调用 Jev 决策模型进行系统级判断的开发者。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:kaijia323/dsh-plugin-jevドキュメント
README 全文を読む ↗配置
transport 默认 typesafe 只接受 typesafe;写入已移除的旧传输名会在注册阶段报错(含 'removed')
baseURL 默认 https://api.typesafe.ai 官方端点根地址
model 默认 jev-latest 请求 body 里的 model
apiKeyEnv 默认 TYPESAFE_API_KEY 首选密钥环境变量名
keyFile 默认 ~/.config/typesafe/key
timeoutMs 默认 60000 单次 HTTP 请求超时
toolTimeoutMs 默认 timeoutMs*(retries+1)+5000 注册表工具级超时
retries 默认 0 仅对超时/网络/5xx 重试,4xx(含 429)永不重试
maxStateBytes 默认 262144 state 字节上限
maxQuestions 默认 64 单次问题数上限
policySection 可选,默认 { enabled: true, order: getSectionOrder('MCP_SERVERS') + 10 }
enabled:false 时不注册 B 面常驻政策段;order 必须是有限数
timeoutMs / toolTimeoutMs / maxStateBytes / maxQuestions 必须是正有限数,retries 必须是非负整数;
否则 apply() 在注册阶段就抛错(例如 tool-jev: timeoutMs must be a positive finite number)。
policySection 只控制 B 面(常驻政策段),不影响 A 面描述与工具本身,字段全部可选:
policySection.enabled 默认 true。写成 false 时插件仍正常注册 jev_decide(工具目录不变,
避免抖动破坏请求缓存),只是零次注册 jev-decision-policy section。
policySection.order 默认 ctx.systemPrompt.getSectionOrder('MCP_SERVERS') + 10(当前中央
序位表下 MCP_SERVERS = 3100,即默认 3110;位于 MCP 段与 TOOLS_SDK
之间)。显式写入的有限数原样使用(可为负);缺省值延迟到有 ctx 时才
求值。getSectionOrder 抛错或返回非有限值时回退常量 3110,且不阻断
工具注册。
enabled 必须是 boolean、order 必须是有限数,否则 apply() 在注册阶段抛 'tool-jev:' 前缀的 Error
(如 tool-jev: policySection.order must be a finite number)。字段整体缺省即 enabled:true,
所以不改任何 profile 文件也能获得 B 面;若在用户层写 id: tool-jev 覆盖,注意那是整份替换
config,但 policySection 缺省仍按默认值生效(见「安装」注意事项 4)。
密钥解析顺序:$apiKeyEnv -> $JEV_API_KEY -> keyFile。密钥永远不作为工具参数传入,因此不会 进入对话记录。推荐放文件:
mkdir -p ~/.config/typesafe && printf '%s' 'apikey_...' > ~/.config/typesafe/key && chmod 600 ~/.config/typesafe/key
(上面是占位符,请替换成真实 key;key 不要写进仓库任何文件。)