Towzai/dsh-memory-jev ↗★ 0

dsh-memory-jev

基于Jev决策模型的记忆管理插件 适合需要通过类型化判定严格控制记忆写入、召回和注入预算的高级用户。

套件
dsh-memory-jev
相容性
待驗證
Harness 依賴範圍
>=0.1.0
Cordis 依賴範圍
>=4.0.0
版本
0.4.1
授權
MIT
最近更新
2026年9月20日

安裝

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

Configuration

KeyDefaultMeaning
storePath'' (= /data/gate-store.json)Store file; pin an absolute path in production
injectEnabledtrueMaster switch for the injection gate
injectInSubagentsfalseInject in child sessions too (cost scales with children)
injectLimit3Max memories per injection
injectMinProbability0.6Relevance threshold for injection (stricter than manual recall)
prefilterLimit40Candidates sent to Jev
supersedeCandidates12"Possible duplicate" candidates for the write gate
dailyBudgetCny3.5Daily budget (CNY)
dailyCallLimit3000Daily call cap

Tuning

Every magnitude is a config value — nothing is hidden in the code. Change them in the profile's cordis.patch.yml (or the bundle's own patch) and restart DSH at process level.

KeyDefaultEffect
injectEnabledtruemaster switch for the injection gate
injectLimit / injectMinProbability3 / 0.6memories per injection / relevance threshold (pinned entries bypass it)
recallMinProbability0.5mem_recall threshold — also overridable per call via min_probability
prefilterLimit / supersedeCandidates40 / 12candidates sent to Jev / duplicate candidates for the write gate
worthReviewThreshold0.35below this the write gate only annotates "review suggested" — it never blocks a write
dailyBudgetCny / dailyCallLimit3.5 / 3000daily budget (CNY) and call cap
injectTimeoutMs / toolTimeoutMs1500 / 15000latency budget for the injection path / for tools
egressGuardfalseoutbound-only pattern guard (opt-in)
injectInSubagentsfalseinject in child sessions too

Tune from evidence, not feel: the audit log records every candidate's noul probability together with the threshold in force, so mem_gate_log (or the per-day gate-decisions-*.jsonl shard) tells you exactly what a given threshold would have admitted or dropped.

Cost model — Jev input is $0.042/M and output is free. The plugin accounts and reports in CNY (rate constant USDTOCNY in lib/index.js). A measured judgement costs 2,000–4,200 input tokens ≈ ¥0.0006–0.0012. Budgeting is reserve → settle → reconcile, with a serialized ledger so concurrent calls cannot overspend.