HaydenSmith1121/dsh-memory ↗★ 0

dsh-memory

Session-end memory for DeepSeek Harness: distils each turn's new dialogue into durable notes, then recalls the global set plus the current workspace's in a per-agent prompt section. 适合需要自动提炼对话并跨会话召回相关记忆的智能体任务。

Package
dsh-memory
Compatibility
Unverified
Cordis peer range
^4.0.2
Version
0.1.0
License
MIT
Last updated
Sep 18, 2026

Other repositories with this package name

Install

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

五、配置

全部走环境变量——这样宿主半一个包都不导入(只有 node: 内置模块)。 代价是没有 config schema,收益是:harness 换版本时改了任何插件 API, 都不可能让本模块 import 失败把整棵插件树带崩(就是 plugin tree failed to load 那个失败面)。本插件只有 8 个旋钮,也没有 UI, 这个取舍是划算的。

变量默认作用
DSH_MEMORY_DISABLED—非空则挂载但完全惰性,排查插件树时用
DSH_MEMORY_ROOT$DSH_HOME/memory记忆根目录,测试指到临时目录
DSH_MEMORY_MIN_CHARS600新一轮文本量下限
DSH_MEMORY_MIN_INTERVAL_MS60000同会话两次蒸馏最小间隔
DSH_MEMORY_TRANSCRIPT_CHARS16000单次蒸馏喂进去的正文上限
DSH_MEMORY_RECALL_BYTES6000召回段字节上限(超了丢最旧的)
DSH_MEMORY_FILE_BYTES32000单个记忆文件字节上限
DSH_MEMORY_MAX_TOKENS1200单次蒸馏输出预算
DSH_MEMORY_TIMEOUT_MS45000单次蒸馏超时(AbortController)

蒸馏用默认模型路由(agentDefaultModel.currentSelection())。 想省钱就在「设置 → 模型」里把默认模型换成便宜的——蒸馏是一次普通的 ctx.llm.stream() 调用,没有单独的模型配置。