chucan1/dsh-plugin-xt-memory0

dsh-plugin-xt-memory

为 DeepSeek Harness 提供跨会话自学习记忆插件,支持 BM25 检索与后台提取合并。

AI 分析

通过工具自动提取、去重并在新会话中注入历史记忆。适合需要跨会话保持长期上下文、个性化设定或项目背景信息的长期任务。

套件
dsh-plugin-xt-memory
版本
0.1.0
授權
MIT
最近更新
2026年9月2日

安裝

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

配置

在 profile 的 cordis.patch.yml 覆盖(或 bundle 行内 config:):

- id: memory
  name: dsh-plugin-xt-memory
  config:
    dir: D:\custom\memory-root   # 数据根目录(默认 ~/.dsh)
    budgetChars: 4000            # 注入字符预算
    topK: 5                      # 注入条数上限
    archiveDays: 30              # 0 = 关闭归档
    maxPerTurn: 2                # 每次提取最多写入条数
    debounceMs: 60000            # 提取防抖
    merge: true                  # 语义去重/合并(需额外一次 LLM 调用)
    extractor: true              # 提取器总开关
    provider: deepseek           # 辅助提取模型路由(缺省走宿主默认)
    model: deepseek-chat

环境变量兼容层(XT 语义):DSH_MEMORY_DIRXT_MEMORY_BUDGET_CHARSXT_MEMORY_INJECT_TOP_KXT_MEMORY_ARCHIVE_DAYSXT_MEMORY_MAX_PER_TURNXT_MEMORY_DEBOUNCE_MSXT_FEATURE_MEMORY_MERGE。插件 config 优先于 env。