Sev7eEn7/sieve--packages-dsh-sieve ↗★ 3
dsh-sieve
Context admission and disclosure layer for DeepSeek Harness: tool output admission, history forgetting, skill catalog disclosure 适合需要控制工具输出、管理上下文额度及配置Jev判断服务的用户。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Sev7eEn7/sieve#72cb90bae727960956660b8e80a8d7c10fcafbc3&path:packages/dsh-sieveREADME
Read the full README ↗配置 Jev 密钥
任选一种:
- Web 面板:右侧栏 Sieve 页的「Jev 判断服务」,为 TypeSafe 或 OpenRouter 粘贴密钥并保存。密钥存进
$DSH_HOME/.credentials.yaml,只发往宿主,面板不会回显。两个都配置时优先用 TypeSafe。 - 环境变量:
TYPESAFE_API_KEY或SIEVE_JUDGE_OPENROUTER_API_KEY,可以放在启动dsh的 shell 环境、启动目录的.env或$DSH_HOME/.env中。进程环境变量的优先级高于面板保存的密钥,此时面板只显示来源,不能修改。
[!IMPORTANT] 使用默认的
auto时,只要环境里存在TYPESAFE_API_KEY(例如 shell 配置文件中的 export,或项目.env),判断就会改走 Jev 并产生 TypeSafe 费用。只想用会话模型时,把judge.type设为llm。
[!NOTE] sieve 的判断内核源自 mu。mu 采用级联判断:先由本地 Laya 模型回答,拿不准的再交给 Jev。Laya 依赖 macOS Core ML 和一个本地 sidecar 进程,没有移植到 sieve。sieve 目前只支持上表中的三种后端。
配置
不写配置即可使用:judge 为 auto,所有决策为 active。需要调整时在 profile 的 patch 中配置 sieve 服务:
- id: sieve
config:
judge:
type: auto # auto | llm | system-one | off
timeoutMs: 4000
modes:
default: active
skills.disclosure: shadow
routes: # 可选:为单个决策指定更便宜的 llm judge 模型(auto 与 llm)
context.forget:
provider:
model:
judge.type | 说明 |
|---|---|
auto(默认) | 有 Jev 密钥时用 Jev,否则用会话模型,见判断服务 |
llm | 只用会话模型;可写 provider 与 model 指定判断用的模型,也可用 routes 按决策分别指定 |
system-one | 只用 Jev,或任何兼容 System One 协议的端点;需要 apiKey(建议写 !!js process.env.XXX),可选 baseUrl 与 model(默认 jev-latest) |
off | 不调用 judge,只运行规则 |
指定 Jev 端点的例子:
- id: sieve
config:
judge:
type: system-one
apiKey: !!js process.env.MY_JUDGE_KEY
baseUrl: https://
model: jev-latest
非法配置(例如未知的决策 id)在加载时直接报错,不会静默回退。