LittleBlackTong/dsh-plugin-memory ↗★ 0
dsh-plugin-memory
Long-term memory plugin for DeepSeek Harness: persistent cross-session markdown memory with a soul/persona file, auto-injected at every session start, plus remember/recall/consolidate/forget workflows and portable migration tooling.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LittleBlackTong/dsh-plugin-memory说明文档
阅读完整 README ↗配置
| 键 | 默认值 | 含义 |
|---|---|---|
enabled | true | 总开关:关闭后不注入 boot 块、不注册 memory 技能 |
memoryDir | ~/.memory | 记忆库绝对路径(~ 自动展开) |
bootFiles | [SOUL.md, MEMORY.md, index.md] | 开机注入的文件 |
bootMaxChars | 6000 | boot 块总字符预算(防止占用过多上下文) |
autoInject | true | 会话开始时注入 boot 块 |
registerSkill | true | 注册内嵌 memory 技能 |
scaffold | true | 记忆库缺失时自动创建模板(只建不覆盖) |
configFile | /memory.json | 用户可改配置的 JSON 文件路径(设置面板读写它) |
设置面板(热改)
enabled / memoryDir / autoInject / registerSkill 四项在 DSH 设置页的「记忆 Memory」区块中可改,即时生效:boot 注入、技能注册随修改立即重建;记忆目录切换时自动为新目录初始化脚手架(scaffold: true 时)。其余键(bootFiles / bootMaxChars / scaffold / configFile)只在 composition 配置层生效,改完需重启。
覆盖 composition 键(例如把 boot 块预算调大),在 profile 的 cordis.patch.yml 里写不带 insert 的 id 覆盖条目:
- id: dsh-memory
config:
bootMaxChars: 12000
实现说明:DSH 的 settings wire 只服务硬编码的命名空间白名单,插件命名空间写不进去,因此本插件走自建通道——配置存
/memory.json(schema 校验 + 原子落盘),由插件自注册的GET/POST /api/memory/config路由服务,客户端区块 fetch 直连。
首次使用:铸魂
插件安装后,第一次会话里 agent 的首要任务不是干活,而是与你对话定义它的灵魂:名字、性格、价值观、语气、边界,以及你的身份与你们的关系。逐项确认并写回 SOUL.md / user/profile.md,直到 BOOTSTRAP.md 的 status 变为 complete。你可以随时跳过或暂缓。