dsh-jev-memory
Typed, auditable long-term memory for the DeepSeek Harness: a turn-end write hook, a judgement layer (Jev or a deterministic fallback), a local store, and per-session recall injection. 适合需要对Agent记忆进行分类、冲突检测及人工确认的高级定制任务。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lrqiisrom/dsh-jev-memoryドキュメント
README 全文を読む ↗配置
- insert:
- id: jev-memory
name: 'file:///absolute/path/to/dsh-jev-memory/dsh/index.ts'
config:
types: [constraint, pitfall, decision] # 只记这三类
judge: auto # auto | jev | heuristic | off
minImportance: 0.6 # 确定性写入阈值
minRemember: 0.6 # Jev 的"值得记吗"阈值
askOnConflict: true # 发现矛盾时问你一句(HITL)
askOnConflictTimeoutMs: 600000 # 等你回答的预算(10 分钟)
askOnConflictMaxAttempts: 3 # 超时后在下一次对话开始前重问,最多几次
repeatFailuresToWrite: 2 # 同一个错重复几次才算"坑"
writeSkipSubagents: true # 见下方"实测发现"
writeTimeoutMs: 2500 # 回合收尾的写入预算,超时放弃
recall:
maxTokens: 600
quota: { constraint: 4, pitfall: 3, decision: 2 }
jev:
apiKeyEnv: TYPESAFE_API_KEY # 从下面三处按序解析,密钥不写在配置里
model: jev-latest # 台账会记录实际应答的版本号,便于发现别名漂移
密钥放哪:按序解析 ① 宿主 ctx.credentials 服务的 apiKeyEnv 引用(存 ~/.dsh/.credentials.yaml,权限 0600)→ ② 直接读同一个凭据文档(服务在开机那一瞬可能还没就绪,这条兜底让"时机"不再决定判定方式)→ ③ 配置里的 apiKey / 进程环境变量。解析发生在每次判定时而不是挂载时,所以运行中新增或轮换 key,下一轮就生效、不必重启。台账的 start 行写明实际用了哪条路径(service:file / file / config / env / none)。没有 key 时 judge: auto 自动退回启发式,插件无需网络即可工作。