Towzai/dsh-memory-jev ↗★ 0

dsh-memory-jev

DSH memory plugin gated by the TypeSafe Jev decision model: mem_* tools whose every read/write is a typed judgement (choice/noul) — write gate, recall gate and a fail-closed injection gate with budget, audit log and restore/merge. 适合需要通过类型化判定严格控制记忆写入、召回和注入预算的高级用户。

パッケージ
dsh-memory-jev
互換性
未検証
Harness ピア範囲
>=0.1.0
Cordis ピア範囲
>=4.0.0
バージョン
0.4.1
ライセンス
MIT
最終更新
2026/09/20

インストール

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

ドキュメント

README 全文を読む ↗

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.